There are different types of production cities as the game progresses, and depending on your civic choices.
Basically, any production city needs some tiles producing excess food and a number of tiles that produce a large number of hammers. You generally want to be capable of producing 5-6 excess food to allow the city to grow fast enough to reach its cap, and then use the population to work all the production tiles they possibly can. You might want to manually reassign workers at this point if the governor is misbehaving

If you notice your happiness/health is far below your caps later on, grow the city some more (so it can work more tiles, thus producing more).
At the start of the game, hills and resources (stone, copper, iron etc.) are your main source of hammers. Mines continue to be productive throughout the game, so a city with a couple of food resources and quite a few hills is going to be capable of decent production from the start, if you improve the terrain correctly. Forests (especially plain forests) can be used to supplement production when you are nearing your health/happiness caps, by switching workers over from food producing tiles. It's generally not a good idea to chop down all the available forests, especially seeing as there is no way you need to improve all the tiles around a production city in the early game. A decent production city should be capable of producing things without the need for excessive chopping. That doesn't mean no chopping at all: chopping in a quick granary or forge can be very useful; chopping forests on hills to build a mine results in a boost to production in the early game. Just leave some forests for the extra production they provide on flat terrain, and hope for them to spread. You'll be happy you left them later on, both for lumbermills and the health bonus. Production-boosting buldings are generally detrimental to the health of the city.
Later on in the game, you gain access to workshops, watermills and lumbermills, which can dramatically increase a cities production capabilities, especially as you gain access to more and more techs that improve their output. Coupled with state property, workshops and watermills can turn any grasslands city into a production powerhouse that can continue growing as well - at this point you no longer need mines. You can simply clear an area of jungle (ideally with one or two food resources), and spam workshops or watermills at will.
State property is the ideal civic for waging war - your production is bolstered (by being able to spam workshops everywhere) and captured cities cost much less upkeep. This is the route to a domination victory. It's probably a good idea to know by the early mid-game (around guilds), whether you are going to switch to state property or not (i.e. go for domination), and improve tiles accordingly. If you aren't going to switch, workshops and not such a good improvement, and you're better off relying on hills and/or forests for production. For this reason, I'd say that forests become far more important to production if you aren't going to run state property.
Railroad lumbermills and mines around your production cities the turn you get railroad! You ought to have a number of relatively idle workers at this point anyway. Those extra hammers make all the difference when the multipliers are applied.
One thing not to do is build cottages around your production cities. You don't want to be wasting your production building libraries, markets and such, this is where you military infrastructure needs to go. Granaries are also very good, as production cities are often slower at growing once they reach a larger size. Other than that, barracks, forges, factories and a source of power are obvious musts; you also want to place the ironworks, heroic epic, west point and red cross in these cities. I like ironworks + west point in my top production city. Build laboratories if you're going for a space race victory.
Use these cities to build you empire's army. Any time you aren't bulding a
vital building or wonder, these cities should be replacing obsolete units, garrisoning new cities or bolstering your growing invasion force.
Re: spaceship
Use your big production powerhouses to build the space elevator and the larger spaceship parts. It generally doesn't matter which cities are producing the casing ,for example; they'll probably be finished before you've researched fusion anyway (unless your cities are really THAT useless?!?!). What's far more important is making sure that the last couple of parts to be finished are built in the best production cities. After all, it's the last completed piece that determines when you can launch, not how quickly you built the others. Don't forget that you can switch to universal suffrage (to boost production from towns) and use bureaucracy to squeeze as much spaceship production as you can out of your cities!