Quoted from http://support.microsoft.com/kb/906502
Important When you format a storage device, all of the information
saved on that device is erased and cannot be recovered. Make sure that
you either do not want the information stored on that device or have
backed up the information to another device before you continue.
To format a storage device
- Start your Xbox 360 console without a disc
in the tray.
- Go to the Settings hub, and choose System.
- Select Storage.
- Highlight the storage device that you want to format, and
then press the Y button on your controller.
In this case you want to select your Xbox Hard Drive
- Select Format. You receive the following message:
This will delete all content on this device. Do you want to continue?
- Choose Yes to format the storage device.
- If you are asked to enter your console serial number, enter your number, and
then select Done. This step helps guard against accidental formatting.
The console serial number is located on the back of the console and
behind the oval door on the front of your console.
What this won't delete
As mentioned above, this will clear the Hard Drive, but not your Xbox Live profile, which is stored on the Xbox Live servers. You will be able to use your profile on another Xbox if you sign in using your username & password.
What this will delete
All games, music, video, personalized settings and save games (unless they were previously transferred to another drive or the cloud.