Food is a tradeable resource, which is used to pay upkeep on various sources. It is also required when building certain units.
The upkeep applies to the same units that require food to be build. It also applies to every citizen in your empire.
Food is generally acquired through the farm improvement, and further enhanced through bonus resources such as Wheat, and even further enhanced through farmer specialists.