Experience

As you progress through the game, your HP will gradually increase. This shows that you are learning more and more.

Gaining XP
At the end of a battle, you are granted a certain amount of xp depending on how difficult the monster you defeated was. You can also gain xp from various things during your adventure, for example, sending mail gives you 5 xp.

Defeating a monster
When you kill a monster, you will gain xp based on the its statistics. Armor, including natural armor such as fir; attack score, which represents the monster's ability to hit and how much damage they will deal; max hp; money; and moral, which effects how likely the enemy is to flee.

If you fight a monster which then runs away, you still gain xp. However, you gain at most about half the xp you would have gained for killing the monster.

Events During your Adventure
Some actions grant xp during your adventure (besides combat). This is usually for accomplishing some goal, returning a quest artifact, or other significant action. To say more would spoil the game.

Monster XP
Monsters don't gain xp. They regenerate all damage at the end of a battle, but that is it. This means that monsters almost never learn, while you do.