Basic Combat
The most direct way to defeat enemies is by attacking them with the weapons you are holding. To do this, stand next to an enemy and then press the dpad in the direction of that enemy. Since you cannot walk in that direction, which is what the dpad usually does, the game changes your action to an attack. When you damage an enemy like this, the damage you deal is reduced by the enemy's defense stat so the number of attacks required to defeat an enemy is increased by both their HP and their defense.
Each time you move, attack, cast a spell or change your equipment, each enemy is given a chance to take a turn. If the enemy has more speed than you, they may even take more than one turn. If an enemy is standing next to you, they will use their turns to attack you. Some enemies can attack from a distance even and you will see a missle from them shoot across the room to you. Damage from enemies is reduced by your defense stat.
Additional Types of Damage
You may find items or level-up rewards that lets you burn enemies. Each time an enemy takes a turn while burning, it takes damage equal to your "burn damage" stat (which starts at one.) This damage is not reduced by the enemy's defense so only their HP matters in how long it will take burn damage to defeat them. Watch out, some fire based enemies may be healed by burn damage, and most enemies can remove burn from at random intervals.
Any other way you can deal damage to enemies (mostly through spells) is called "spell damage." Like burn damage, this damage is not affected by the enemy's defense. There are some enemies immune to spell damage.
Some enemies will poison you instead of dealing damage directly. In most cases, the amount of poison they inflict on you is reduced by your defense. Once you are poisoned, you will lose a set amount of HP. You can see the part of your HP that has been changed to a hollow bar to see how much damage you will take by the time the poison expires. You have two additional defensive stats that help with poison: poison slow and poison res. Poison slow reduces how much damage you take from poison each time you act. While this can lower the damage you take per turn, it does not lower the total damage you take. Poison res increases the chance that a turn of poison damage does not hurt you which will reduce the amount of total damage you take.