The generals are your Facebook or Google+ friends which you appoint in Officer's Quarters. If your friends that you appoint also play the game, they will cost 50% less per hour (10 gold/hour instead of 20 gold/hour) . Each attack you send requires a general. To upgrade a general up to 5 star you need to win 13 battles with him appointed. The fastest way is to attack the closest wilderness of lv1 with enough army to win and with the general that you want to train. Each time your general levels up it will increase the battle effectiveness of the army sent out under that general's control.
After appointing all your generals, you keep them even if you destroy the Officer's Quarters.
Your Officer's Quarters goes up to level 12 (which gives 15 generals). However, you can only send 12 out since a level 12 Muster Point will only allow 12 attacks.