Make sure you have heroes enabled, and then try to be the best player in the game. The best player is the one that gets awarded the hero bonus.
The settings can be altered for instant action. Simply go into options, go to the hero submenu, and you can set it so you instantly have access to the hero and can re-access them whenever you want. Or perhaps you mean in galactic conquest? Go into the bonuses submenu, then purchase the bonus for 800 credits.