Time machine makes a back up of all of the user files. That includes your account, your preferences, your personal files, your installed programs, etc.
Time machine does not back up the operating system itself.
Time machine IS a full back up of all of your files.
Time machine is also version control.
The first time it runs, it backs all of your files.
The next time it runs, it only saves the changes you've made to your files. Since most of your files remain the same, only a few things get backed up.
----------------------------------------
If you want a clean installation of OSX, then time machine is all you need.
1) Use time machine to make a backup of your system to an external hard drive.
2) Use the OSX install disc to reformat your current hard drive.
3) Use the OSX install disc to install OSX.
4) When you are prompted to make a new user, select "migrate from time machine backup" (I don't remember the exact wording, but it's like that).
5) Your done.
This gives you a fresh install of the operating system, and then it restores all of your stuff.
-----------------------------------------
If you don't want a clean installation, but instead want to migrate to a new hard drive (say you bought a faster one or a bigger one) then you can simply clone your current drive to the new one. That copies the operating system as well as all of your files.