Hi Windows Vista 7 and 8 all defrag automatically when the pc is idle , but here is how to get there your self.
Caution: Do not run Defrag if you are using a SSD drive.
Windows XP, 2000, Vista, and 7 users
Windows 2000, XP, Vista, and 7 Defrag
To run Defrag, we recommend you follow the below steps.
Double-click My Computer or open Explorer.
Highlight the local hard disk C: drive by clicking on it once.
Right-click the highlighted local drive Click Properties
Click the Tools tab and click the Defragment now button.