Formatting will wipe everything off your hard drive. It'll give you a fresh clean start. Anyhow in order to boot your machine with no OS installed on it you have a few options.
If it's a retail machine that you bought and not built yourself you should have a system restore disk that came with your machine. That will boot your machine and give you access to your CD-Rom. Just type the letter of your cd drive and then type setup and sit back and watch the show.
If it's a machine you assembled yourself you'll need to create a boot disk that will intialize your CD-Rom as well. Go to your start menu, control panel, add/remove programs and click on the create startup disk. This will copy all the needed system files you need to boot the machine. It's a wise move to test the boot disk before formatting your hard disk!!!
Save heating costs on your home, overclock your PC!!!