By defeating enemies and completing quests. You'll also earn experience points which you can use to level up your character.