A farm produces 2 population to the city it's built in when placed. It can only be placed on fields with crop after you have researched the Farming technology. It costs 5 stars to build a farm.

The Windmill, which is unlocked after researching Construction, produces 1 extra population to the city which it is built in for every adjacent farm, even if the farm is in another one of your cities' territories.