"Upgrading", as the name suggest. This allow you to pay some resource to make a unit become more powerful.
Upgrading can only be done in the homeland, so you will have to redeploy your unit there to upgrade.
You can do this by clicking on the unit, select the yellow "Upgrade" button, access there. Look at the cost and gold required. and click on "Upgrade" on the menu. Your unit will be renamed "Unit Ultimate"
If an Elite Unit is Upgraded. It lose "Elite", and can be fully destroyed.