Since this question comes up a lot I figured I might as well make a page with pictures to show the process of leveling a unit all the way up to level 50. You need to collect four identical unit cards and then promote them until all 4 are consumed as below:
Notice that the max stats (stats in green) go up with each promotion. The orange stats are the actual stats for your unit right now which they go up a little bit with each promotion as well. Also notice the white and orange bars on the lower right corner. A white bar means you can still promote it further but when all the bars are orange like the top unit in the last picture your unit is fully promoted and can't combine with any more cards. Next step is leveling and you need a lot of expendable cards in storage to consume and a lot of money as well. Click on your unit and below it should give you the option to level. Pick the empty boxes which will take you to your garage where 50 of your unit cards are displayed. Pick six units at a time that you wont ever use and consume them to start leveling your unit. I recommend using common and uncommon units for this since you can get plenty of them but rare units provide more bonus if you get to the later missions where you earn them as a reward and they are more plentiful. Below is a picture of the leveling screen where I top off this unit.
This is a good example of why you use trainers as well. Apart from leveling your unit faster than any other unit card, they also give an added bonus. (Edit: I haven't noticed a trainer bonus since the last few updates so it may have been removed) Notice the orange stats in this picture are the max stats available for this unit and the blue stats are what my unit will actually have when I finish leveling. Notice since I'm using trainers to finish it off the blus stats are about ten points higher in both categories so my unit is actually better than what a standard level 50 unit would be. Always try to top a unit off with a rare trainer over an Uncommon since they give a bigger bonus and if you are lucky enough to get a Super rare then it has to give an even better bonus. As a units rarity goes up so also does the cost of promoting and training it but if you plan on using the unit in your squad then promote it and level it as much as your finances, and spare unit cards, allow you to. A level 20 unit beats a level one unit and a level 21 unit is better than that.
It is better to actually train a unit to its max stats before you promote the identical cards because it takes less units and money to train a unit to level 20. As you get higher up the cost goes up exponentially so say it takes 6 units to train something from level 19 to 20 then it could take like 50 units to train that same unit from level 49 to 50. If you take four identical Rare - Epic units and train them all to level 20 and then promote them you will end up with a level 50 maxed unit. Also don't get in such a rush that you waste a good unit to consume in leveling up a new unit since if you are patient you can usually get enough spare unit cards to level it up in a day or two (or a couple of hours for some players).