A site definition itself does not represent a creatable site template. Instead, a site definition contains one or more configurations, and these configurations are what appear to users as creatable site templates. Therefore, the STS site definition contains three different configurations: Team Site, Blank Site, and Document Workspace.

Similar to a WSS feature, a site definition is defined with a set of Collaborative Application Markup Language (CAML)-based files that are deployed within a named directory on the file system of each front-end Web server in the farm. Site definitions are deployed within the 12\TEMPLATE\SiteTemplates directory. The core file of the site template is 12\TEMPLATE\SiteTemplates\{sitetemplate_name}\xml\onent.xml. It is referenced in the 12\TEMPLATE\{culture}\XML directory in WEBTEMP.XML files, where the folder is the locale identifier (12\TEMPLATE\1033\XML for US English). </p> <img style="cursor:pointer; cursor:hand;width: 400px; height: 361px;" src="http://2.bp.blogspot.com/_yUba7cqllFE/STw3w1eco8I/AAAAAAAAAPI/kCRGkQivL60/s400/sitetemplates.bmp" border="0" alt=""id="BLOGGER_PHOTO_ID_5277154175499412418" /> <img style="cursor:pointer; cursor:hand;width: 400px; height: 154px;" src="http://4.bp.blogspot.com/_yUba7cqllFE/STw4lbvQXLI/AAAAAAAAAPQ/PuoMqAfEtVo/s400/templatereference.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5277155079123655858" />

Here is sample of the onet file, it define every thing about the site

<img style="cursor:pointer; cursor:hand;width: 400px; height: 386px;" src="http://3.bp.blogspot.com/_yUba7cqllFE/STw72n1mmBI/AAAAAAAAAPY/7yqWp9qcHcc/s400/onet.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5277158672964163602" />

A xml file in the 12\TEMPLATE\{culture}\XML folder can contains the configuration of more than one site templates.Here is an exmaple

<img style="cursor:pointer; cursor:hand;width: 400px; height: 264px;" src="http://3.bp.blogspot.com/_yUba7cqllFE/STw9AgLK2gI/AAAAAAAAAPg/S2pxkcu6fuo/s400/sitedefinition.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5277159942217456130" />

When creating a new site by using the STSADM.EXE command-line utility or through custom code, you are often required to reference a site definition and one of its configurations by name. This is done by specifying the name of the site definition followed by the pound sign and the integer identifier of the configuration. For example, you can use STS#0 to reference the site template titled Team Site and STS#1 to reference the site template titled Blank Site. The following example uses one of these site template references when creating a new top-level site by using the STS command-line utility.

STSADM.EXE -o createsite -url http://Domain.com -ownerlogin Domain\Administrator -owneremail administrator@Domain.com -sitetemplate STS#1