Here is a great guide by our friend The How-To-Geek on how to do it in Vista, the same applies to Windows 7.
When you restore to that point, everything installed after the restore point will be lost. Essentially you are taking a "snapshot" of your programs, drivers and the registry in time and are able to go back to that point. Microsoft has an informative FAQ with more answers.
As for the formatting of your drive, a restoring after a format would kind of be pointless, since you could just restore before formatting and get the same results. But that doesn't matter, because the restore information is stored on a per Windows install basis, so if you reformat your machine, you will lose all of your restore information.