Each city has a number of hammers that it makes. Each building and wonder (and unit, and anything you build in fact) has a hammer cost. The number of turns it takes to build the unit/wonder/building is the hammer cost, divided by the hammers per turn. Each turn, the number of hammers you produce each turn, is added to the building project. If this would make more hammers than needed (EG. You make 20 hammers per turn, but the project only has 10 hammers left), the 'overflow' is carried on to the next building project.
Hammers per turn is a little more complex, but not obscenely so.
Each tile has a hammer yield. Grassland has none, for example. Hills give +1 hammer, -1 food. Forests give +1 hammer. Plains get 1 hammer and 1 food, so a forested hills plains gives 3 hammers, whereas a forested hills grassland gives 1 food, 2 hammers.
Specialists sometimes (not usually) give hammers too. Engineers give 2 hammers, Priests give 1 hammer, and 1 gold, and citizens give 1 hammer. Great Prophets, Great Enginneers give bigger hammer bonuses.
Certain improvements increase hammers. Mines give a large (2~4, depending on your stage of the game) boost to hills tiles. Workshops give a slightly smaller (1~3) hammer boost, and reduce the food output of a tile by 1, but they work on flatlands, which are notoriously bad at production. Towns, when you run the Universal Suffrage civic gives +1 hammer.
The civilopedia gives a full run down on how you can increase the number of hammers you can get.
Certain buildings, increase hammers.
Forge gives +25% hammers
Factories give +25% hammers, and another +50% hammers with power
Having a state religion, and the Organised Religion civic gives +25% hammers, but ONLY when you are building a building.
Heroic Epic gives +100% hammers, but ONLY when you are building a military unit (IE. A unit that is not a settler, worker, or workboat)
Military Acadamies give +50% hammers (Warlords / BTS only, you use a Great General to make one), but ONLY when you are building a military unit
Ironworks give +50% hammers with iron, and +50% hammers with coal
All these bonuses are additive. So if you have a forge, a factory, and power, and have 10 hammers as the base rate (from specilists and worked tiles), you get 10 + 25% + 25% + 50% = 10 + 100% = 20 hammers. In Civ III and earlier, they would be multiplicative, which would make more. So if you have a forge and 10 hammers, a factory will only give 2.5 more hammers, so you would go from 12.5 to 15 hammers.
All of this info is given by rolling over what you want.
Resources also increase hammers on the tile. Iron is one of the best, giving +1 hammer always, and a massive +4 (??) hammers when it is mined. Cows are interesting... they give +1 hammer when pastured, for some reason. All metals, and coal, give massive hammer bonuses when the appropriate improvement is built. To see which one it is, put your mouse over the resource you want to get.
I think that just about covers it
Its mostly common-sense, and rolling over the tiles / buildings and looking at the civilopedia will show you what you need to know. One last thing, in the city view, when you select your tiles to work, an anvil represents 5 hammers.