Population is defined by how many people are living within your city. When resource buildings are constructed or upgraded, they use a number of Idle Population as "Workers" to be able to produce the resources associated with the building type. The Idle Population used for resource buildings are permanently used and do not regenerate.
When training troops, Idle Population is consumed. The Idle Population used to train troops does regenerate after a period of time. The higher your Happiness rating, the faster the Idle Population regenerates. Once trained, troops have no effect on Population or Idle Population and can continue to be trained even if they exceed your Population Limit.