Windows 7 automatically defragments your primary hard drive in a process that runs quietly in the background. However, if you'd like to have all new drives you plug in be defragmented as well, it's going to require a little input from you.
Step 1: Open the Disk Defragmenter from the Start menu by typing "disk defrag" in the Run box (shown below). You can always navigate to the actual program from Start by selecting All Programs > Accessories > System Tools > Disk Defragmenter.
Step 2: Click the "Configure Schedule" button to open up the window where you can pick a desired time to defragment your computer.
Step 3: Now click on "Select disks..." to see a list of disks available for defragmentation.
Step 4: At the bottom of this window, make sure the "Automatically defragment new disks" option is checked.
Step 5: Choose OK in both open windows, and close the Disk Defragmenter.
Now each time a new disk is added it will be placed on the Disk Defragmenter's to-do list. You can always go in and tweak the defragmenting schedule if a specific time (rather than any idle opportunity on the machine) is more convenient for you.