Terraforming can be quite daunting when you first start out, both due to the large number of improvements available, as well as the different types of terrain available. To start with terrain, unlike the Civ games where there was specific terrain types, in SMAC each terrain square has several attributes that all come together to determine its resource output (and how that output is affected by improvements). The first attribute for terrain is rockiness (flat, rolling, rocky) and affects the production resource (shields); base output is 0 for flat, and 1 for rolling and rocky. A mine improvement will increase the output of rolling squares by 1 and rocky squares by 2 (by 3 if there's also a road on the square); however, mines decrease nutrient resource output by 1. The next attribute is rainfall (arid, moist, rainy), and affects the nutrient resources (food) of the square; arid squares have a base output of 0, moist squares a base output of 1, and rainy squares 2. Farms are the basic improvement for nutrient resources, and give +1 for all rainfall levels (however farms cannot by built on rocky terrain). The last attribute is elevation, and affects the potential energy production of squares; all elevations have a base energy production of 0, but if you build a solar collector the amount of energy it products depends on elevation (1 for elevation 0-1000, up to 3 for elevation 3000+). There are also some bonuses that can be added to each square; nutrient resources, mineral resources, and energy resources each give a bonus of 2 to any type of terrain. Squares next to a river get a bonus of 1 to energy resources.
As for stacking improvements, a farm can be stacked with several types of improvements (mines, solar collectors, condensers, and echelon mirrors). Soil enrichers (gotten later in the game) count as an improvement to farms, so can be stacked with any improvement a farm can be stacked with. All other improvements cannot be stacked. Some improvements can also interact synergisticly. Condensers increase the rainfall level of all squares in radius of 2 (thus increasing nutrient output), while echelon mirrors provide a bonus of 1 energy to any adjacent square with a solar collector.
Certain types of improvements give fixed resource output regardless of terrain type (essentially overriding the base terrain output). Boreholes always give 6 energy and 6 minerals. Monoliths always give 2 of each resource. Forests and fungus also have fixed resource output, although this output improves over the course of the game based on technology research and base facilities built (for forests).
Something to also keep in mind is that there is also an environmental impact caused by working improvements; you initially won't see any effect, but as your cities get large you may start to notice an "eco-damage" number on the city screen. The higher this number the great the chance the native planet life will strike back at you each turn, which results in one of your improvements being destroyed (replaced by fungus) and some mindworms spawning on the destroyed improvement. Mines, boreholes, and echelon mirrors cause the most eco-damage, while forests actually help counter eco-damage.
Output from squares is initially capped at 2 of any given resource, although this cap is lifted when certain technologies are researched. Squares with a resource bonus (nutrient resources, mineral resources, energy resources) are not affected by this cap (making such squares highly desirable at the start of the game).
For some starting tactics on terraforming, forests are a great improvement to use for most squares. they start with providing 1 nutrients, 2 production, and 1 energy, and eventually increase to 3 nutrients, 2 production, and 2 energy. Pick 1 or two (rainy/moist) squares near a base and set down a farm and condenser, then make the rest of the squares forests. Forests can't be planted on rocky terrain, but you'll want to put mines on rocky terrain (mine+road on rocky terrain = 4 production). This basic strategy will provide you with good production and energy income from the start, and as the game progresses will also allow your cities to acquire large populations. It also keeps eco-damage in check for most of the game. A more advanced version of this strategy is to use supply crawlers; supply crawlers are units that you can park on a square and they'll transport one resource type from that square back to the base that produced the crawler. Crawlers don't have to operate within the base's normal radius, and squares worked by crawlers don't count towards eco-damage. My typically strategy is to park crawlers on all of my rocky+mine squares for the +4 mineral resources without any of the eco-damage that normally comes from mines. Another approach is the create boreholes and use crawlers to harvest +6 minerals (or energy) from them- high resource production without the normal eco-damage drawback of boreholes.