Upgraded heros retain their upgraded stats even when not the leader of your party.
A Hero's stats can be upgraded using gems or by achieving a certain number of kills with that Hero as your party leader. The first star is achieved at 500 kills or 1,000 gems, the second at 5,000 kills or 10,000 gems and the third at 50,000 kills or 100,000 gems. A combination of gems and kills can be used for upgrades. For example, if you achieve 250 total kills with a Hero, you can spend an additional 500 gems to upgrade them from 1 to 2 stars.
Note: The kills listed under each Hero on the leader selection screen is their top score (highest kills in one game) and is not a cumulative total number of kills.