you only need a ton of units for conquest. builders can get by if they play carefully enough. and i play on normal speed standard size maps.
so the decision to build humongous armies is going to depend mostly on your neighbors (SP) or who you are playing with (MP), and to a lesser degree what kind of land you get. i generally think that a good REX (6 cities by 1AD) is better than a good rush (3-4 cities, but two capitols), all things being equal. but if you need to:
ancient: the only reason to build a lot of units in the ancient era is for a rush. Ancient armies are going to be smaller by necessity; you don't have the infrastructure to support a lot of units. pushing things too far, like by basing your economy on city conquest

will result in unit_strikes.
you have to play smart; recon is crucial. civs that start with hunting should definitely build 1-3 scouts. you could even make it a first build if your land really sucks. civs that start with fishing could consider scouting workboats. other civs can just spam warriors and hope for a woodsman 2 promo. researching hunting early is probably overkill, unless you know that you have an AH resource or ivory.
anyway, the point of the recon is twofold: target and resource acquisition. research bronzeworking early, because it is the only way to get a lot of

quickly. chop and whip 7-10 axemen, immortals, war chariots or skirmishers. you need copper or hoses within your first 2 border pops for this to be viable. building another city takes too long. creative civs have a slight edge by claiming more territory.
classical: this is the first age where you can legitimately war. rushing is just a big gamble. by this point, you know what resources you have available and might have a few cities, so specialize one to build units, with a barracks. horse archers are the best unit if this early era if: 1) they can get to a nearby capitol before culture defense is really high 2) you are playing SP and the ai builds mostly archers, or 3) they lack metals.
aggressive civs get a boost for melee, so swords/axe stack is another option for them. it comes down to what strategic resources you have. waiting until construction and catapults is possible if you can maintain a significant tech lead. praetorians are civ-specific, but awesome, and i imagine guerrilla 3 gallic warriors could work, too.
as for actual production, whips and chops are all you can do to really crank things out. improve all your food tiles, whip units and build/overflow granaries. then just whip units. build workers or settlers when recovering from extreme whip unhappiness. it takes a bit of micromanagement, but could net you a capitol and maybe a couple other good cities.
do not neglect your economy. razing crap cities is the easiest way to prevent a bad crash. however, if you don't have access to fast/strong units, try to get forges in as many cities as possible.
medieval: more happiness from monarchy and resources allow more whipping, while theology and vassalage offer better base units. forges have been around long enough to have built them in good production cities, so turn these into unit pumps. most importantly, the heroic epic becomes available, though it is unlocked, variously, by killing barbarians.
around this time, mixing stacks becomes indispensable. you need to have 2-3 cities focused on units and a little bit of micro can help. but basically you need one to focus on offensive units (knights, trebuchets, maces) while the less productive city focuses on garrison units (pikemen, longbows). additional units can be whipped from other cities, but need to stay large and productive enough to pay for all of these units.
renaissance: research nationalism and gunpowder. start drafting, these will be your garrison units (muskets and later rifles). they can even be your main army if you are the ethiopians or ottomans. spread out the drafts as much as possible, because unhappiness becomes unmanageable extremely quickly. culture slider can help to encounter this, but only as a temporary measure.
this is the age when protective starts becoming a powerful warmonger trait. drafted units get half the exp rounded down of normally built units. so if a PRO leader drafts units from a barracks city while running theocracy, you can turn out a bunch of 3 promo gunpowder units. the more cities you control, the more powerful nationhood becomes.
on the other hand, offensive tactics become more convoluted during this era. cultural defense is going to be high in ai cities, so you need siege units as even very clever espionage tactics are dwarfed by ai bonuses at higher difficulties.
just be careful of overdrafting. there aren't an overabundance of happiness resources and you can kill your economy by going overboard with this. and you need to start thinking seriously about naval power.
industrial: production costs

start being a limiting factor in timely completion of your most powerful units. fortunately, you begin to unlock many different technologies to deal with this. first, there are factories and powerplants. secondly, there is state property and police state. drafting is strong for defensive units, but you will need to build things like tanks and fighters.
modern: units cost many hammers in the modern era. corporations are about the only thing that can cope with directly building things like modern armor. rush buying is a powerful tool, especially with the kremlin. drafting mech infantry is still a rather efficient way to produce hammers, but they can't do much on the attack. [/QUOTE]
=============================================================
however, you can't just be building units "all the time." you need to be completing your strongest attack unit every two-three turns, on normal speed, from your unit_pump, or whatever you want to call it. you also need to realize that total unit production is ultimately limited by the number of cities you control, so early REX will generally result in more units. land is power.
so the trick then is to decide when to ramp up war production based on your leader traits. aggressive leaders are better during the classical and medieval eras. protective is good for renaissance through the modern. charismatic is great for the whole game.