Most buildings in 0 A.D. can train (create) units. If you select a building, you can see in the bottom right panel what types of units can be trained at that building, and how much each type costs.
Every new unit counts toward your population limit, indicated on the top left of your screen. The limit can be increased, by building more buildings such as houses.
If you select a building and then right-click a spot on the ground, you will create a rally point, which is a destination each new unit created from that building will automatically go to. Rally points can be set on resources, so that units will automatically gather that type of resource when they are created.