In typical RPG fashion, characters gain experience points by fighting and defeating enemies, as well as using healing staves or, if a Dancer, by dancing.
Characters gain more experience from felling enemies, so a good trick to training weaker units is to have a stronger unit weaken an enemy first and then letting the weaker unit finish off the enemy.
Healers may have a hard time gaining experience, as they can't fight. Instead, try to heal whenever possible, even small amounts of HP. Once you gain access to the Rescue staff, you can buy a lot of them and spam them to gain experience at a good rate.
When a unit has accumulated 100 points of experience, they will Level Up and their stats may increase. Most units can reach up to Level 20; those in a special class such as Villager can reach up to Level 30.
Note: Character growth is random, so don't be alarmed if a character gains no stats during a Level Up.
In addition to gaining stats, characters may also learn new skills when they Level Up; the skills they can learn depend solely on their class.
Character in basic classes, such as Myrmidon or Cavalier, will learn skills at Level 1 and Level 10. Those in advanced classes, like the Great Knight or Sage, will learn them at Level 5 and Level 15.
Upgrading With Master Seal
Characters in a basic class, eg. Priest, Cavalier, Myrmidon, can use a "Master Seal" item at Level 10 or above to upgrade into one of two advanced classes.
Doing so will greatly increase their stats and return them to Level 1, so they can continue to gain experience.
Which advanced class you pick usually comes down to personal preference, but you may want to factor in new weapon types or increased movement.
Reclassing With Second Seal
Characters in a basic class (eg. Cavalier) can, alternatively, use a "Second Seal" item when they're Level 10 or above (or in an advanced class) to reclass into one two alternate basic classes -- the exact classes depend on the character.
For example, when Chrom is a Level 10 Lord, he can reclass into a Archer or Cavalier.
If the character is Level 10 or above in an advanced class, they will gain the option to reclass to the corresponding advanced classes too.
Following the above example, if Chrom is a Level 10 Great Lord, he can reclass into a Sniper, Bow Knight, Paladin or Great Knight (in addition to Archer, Cavalier and Lord).
After reclassing, the character's Level will be set to 1, so they can continue to gain experience. By using a combination of Second Seals and Master Seals, you can access many different classes and thus learn a huge variety of skills. You can also Level Up characters an infinite number of times...
The best time to use a Master Seal or Second Seal is once you've learned all the available skills for that class, which is usually at Level 10 (for basic classes) or Level 15 (for advanced and special classes).
Furthermore, the game keeps track of a character's total number of Level Ups and the more Levels you gain, the slower your rate of gaining experience. So if you change classes a lot, you should do it at the earliest opportunity, to reduce the number of stored Levels.