There are 3 kinds of units: land, naval and air. Each unit has its own assigned unit role and specific purpose - designed to be used in offence, or defence, or transportation.
For example, Infantry is 'Ground Main Defence', Submarine is 'Naval Stealth', Spy plane is 'Air Support', etc. These roles are always the same across all the maps, so your upgrades and strategies will affect units on custom maps as well. In addition, there are 'Rare' units (only appear randomly when a city is conquered) and 'Other' role (whatever map creator wishes them to be).
Stealth units are completely invisible to the enemy, until they are detected or participate in a battle. After a battle, put them in one of your cities to make them invisible again.
Transport units can be used to transport troops by land, sea or air.
Some units also have an added bonus when defending in a city or defence line (Infantry, Marines), or defending against a certain unit:
Marines against Infantry
Destroyers and Submarines against Bombers
Submarines against Infantry and Destroyers
Detailed information on units is available in the in-game Units menu and on the Units and Strategies