In WSS 3.0, The 12 hive is directory structure where the product is installed into. This folder structure is where all the relevant web pages, features, Site definitions and web services are installed to.
Repeat - the 12 hive is where everything in SharePoint happens and is where all the binaries, configuration, web pages, web controls, help files and other resources reside. As a developer writing your own features for SharePoint, it is vital that you learn where things go and where you should be targeting your resources. Without having an understanding of this, you have lost the battle before you have even started.
The TEMPLATE folder as this is the heart of the site and developers should really get familiar with the Template folder. Of note is the TEMPLATE directory, this directory contains all the necessary web page files that have been provisioned by default.
WARNING!
You should not add to, modify or delete files in the 12 Hive. To add custom functionality to the 12 Hive (including branding) should be done through SharePoint Designer or provisioning using .wsp files.