Your skills and stats are leveled by simply using them. If you want to level your swords skill, swing a sword at a monster. If you want to become a better archer, shoot a bow. Your attributes (Strength, Dexterity, Vitality, Wisdom, Quickness, and Intelligence) will level up passively as you use associated skills. For example, mining will raise your strength and vitality while casting magic spells will raise your intelligence.
Alternatively you can gain levels with the Scribing skill. It allows you to craft spell scrolls and skill books. These can be consumed to increase your skill level in a particular spell or skill. Certain spells such as buffs can only be leveled through the use of the associated spell scroll. Magic essences are required to craft these items and can be found off of monsters or traded from other players.
Skilling magic is a bit different from melee and archery as you start with only with Lesser Magic spells. In order to unlock the next magic school, Greater Magic, you will need to reach 50 Lesser Magic. You can do this by casting your Mana Missile at enemies which is bound to 4 on the hotbar by default. To heal yourself cast Heal Self which is bound to 5.