Units are used to conquer different cities on the Conquest map, or if you fight against other players via the Raid function. However, they won't be there to defend your own city. Units can be obtained by training them in Barracks or Valhalla, as well as in Training Grounds in order to replenish any fight casualty (but not beyond that). Once you gain access to a type of unit, you will be able to develop it after building an Academy and launch corresponding research. Once produced, these units will be stationed in Training Grounds, which level will determine unit capacity.