It is enabled in the system maintenance by default, you can uncheck it if you want.
1. Click Start
2. Click Control Panel
3. Selct the Control Panel Home
4. Click System and Maintenance
5. Under the Administrative Tools section at the bottom, click Defragment your hard drive
6. You may need to grant permission to open the disk fragmenter
7. Click or unclick Run automatically (recommended) depending if you want this feature enabled or disabled.
8. Click OK