if you are not ready to fight,the quickest way to get hero experiance is to hit the highest level of invaders you can,upgrading knowledge or buildings is another way but be careful not to study uneeded knowledge or build your town to high to fast,doing so will put you in higher personal league and make reaching checkpoints harder to get,there are probably other ways to level up that i have forgotten about that others may know of also
Tasks are the main source of hero (and shaman) experience. The Hero Experience (and Shaman Experience) items are well worth employing - apply one when about to complete a set of tasks and when about to complete a sizeable building or knowledge. Getting VIP to level 28 is important.
Early on quests are also a good source - I remember I used to save the quests until both hero and a shaman could benefit.
Hero's keys used to be a bottleneck but it is my impression that they are more easily completed now. Do prioritize that item though.
It does not take too long to max out your hero. Good luck.
John is correct,tasks are a quicker way to get experience,however i assume your still at a stage where task refreshers are not redily available to you and you may not yet have the option to use the complete all tasks function that a higher vip level will allow you to do,if you do, yes task refreshers are the way to go.