Reinstall the Operating System
Normally, if you need to reinstall Windows because of a computer malfunction, you simply go to the Advanced Recovery Methods menu in Control Panel and then reconstruct the operating system from a recovery image that your manufacturer has installed in a separate partition on your drive. But remember that you've wiped all of that out. So you're going to need to use an installation disk. If you don't have the one that the computer came with, go to Microsoft for a copy. (Check page 5 for more info).
With a Mac running OS Lion or Mountain Lion, this is even easier. After you've completed erasing your data, quit Disk Utility, and make sure that you're still connected to the Internet. Then chose the Reinstall OS X option, and Apple's cloud will do the rest. If you're running an earlier version of OS X, you'll need to put a backup system disk in the drive and restart the computer while holding down the C key [source: Arndt].