There are a lot of things that you can do in the Guild Wars 2 world to gain experience. Usually quests and exploring are the two main ways of getting experience in MMO’s.
The unique crafting system in GW2 also gives you experience. In fact you can level your character from 1 to 80 without ever doing a quest, pvp or dynamic event.
In Guild Wars 2 you can train all of the 8 crafting disciplines on one character. Leveling a crafting discipline from 1 to 400 will award you with 10 levels of experience. So if you max out all 8 crafting disciplines you character will gain 80 levels!
This might not be an option for your first character, but if you wish to level an alt in this way its totally doable. Of course you will need all the necessary materials to level all 8 crafting disciplines. You can gather them yourself or buy them of the Trading Post. Buying all the crafting material won’t be cheap so do have a good gold strategy.
You may train all of 8 crafting professions but only 2 can be active at one time. You can change your active skills by visiting a trainer and paying a fee. Upon changing a crafting skill all the recipes and progress will be saved.