You can defragment a hard drive using the disk defragment program that comes with any Windows laptop or desktop computer. This program works to compact data together and increase the speed in which the hard drive accesses files. Tools needed to complete this guide include Windows 7 or 8 and a hard drive. Though Windows 8 automatically defragments the hard drive, you can do it manually when necessary.