Basic Buildings for Both Races

Hall – can be upgraded to stronghold/keep, requiring a barracks, and can be upgraded to fortress/castle, requiring blacksmith, lumber mill, and ogre mound or stables
Farm – each farm can support 4 units (plus the hall can support 1), so you need to keep making farms all game long to be able to grow your population
Scout Tower – gives you vision of the area where it’s built, but requires upgrade in order to be able to attack enemies
Guard Tower – lumber mill building required to upgrade scout tower to guard tower, can shoot arrows at enemy units and buildings to a range of 6 spaces from itself)
Cannon Tower – blacksmith building required to upgrade scout tower to cannon tower, can shoot cannonballs at enemy units and buildings to a range of 7 spaces from itself
Barracks – produces footmen/grunts, archers/axethrowers (requires lumber mill), knights/ogres (requires stables/ogre mound and blacksmith), and ballistas/catapults (requires lumber mill and blacksmith)
Blacksmith – where you upgrade weapons for land units, also required for building ogres/knights and ballistas/catapults, and required to upgrade to castle/fortress, and to upgrade scout tower to cannon tower
Lumber Mill – where you upgrade arrows/axes for archers/axethrowers, also required for building archers/axethrowers, required for upgrading scout tower to guard tower, and required to upgrade to castle/fortress
Stables/Ogre Mound – required to upgrade to castle/fortress, required to produce knights/ogres; a keep or stronghold level hall is required to build stables/ogre mound
Gryphon Aviary/Dragon Roost – for producing gryphon riders or dragons; a castle/fortress is required to build gryphon aviary or dragon roost
Gnomish Inventor/Goblin Alchemist – make dwarven demos/sappers that can explode enemy units and buildings, also required with lumber mill for making flying machines/zeppelins, which are air scouts that can be used to explore the map and see what your enemy is up to; this building is required to make submarines from a shipyard
Shipyard – makes oil tankers for collecting oil and destroyers which are fast speed and good vision and great for scouting your enemy and can attack short range plus aerial units; more units possible with additional water buildings
Oil Rig – an oil tanker must build this building over an oil patch in the water, and can then begin collecting oil, which is required to make boats, as well as for hall upgrades and to build a blacksmith
Foundry – enables you to make transports (to get from island to island across the water with up to 6 units per load) and battleships or juggernaughts, which are heavy duty, slow moving ships with far range and high damage to enemy units and buildings
Refinery – increases oil production when oil tankers bring in oil

Here is a beautifully done link that lists all the stats for each building (how much it costs, how long it takes to build, how many hit points it has, etc.):

Warcraft II Buildings Information

Also, here’s a gorgeous pictorial reference for the information above (like which building is required to make which other building), see:

Warcraft II Buildings Guide