Most modern Windows operating systems will defrag your computer automatically, but you can do it manually if you have Windows ...
To format a hard drive before you start using it in Windows, use the Disk Management utility; on a Mac, use Disk Utility.