Reload the computer's original software before selling or donating it. On a PC, you usually do that by starting it off a system-recovery partition, but check its manual for help. On a Mac, boot from the system CD or DVD and select its "Erase and Install" option .
If you have sensitive data on your PC the best thing to do is remove the old hard drive, destroy it, and then replace it with a new one. If the cost of replacing the old hard drive is prohibitive then run a software program to wipe the whole (including the free space) hard drive clean. This will overwrite everything on the hard drive many times so that it is not intelligible. (Even though a file has been deleted, it is still on your drive.)
If your machine has been used for business, pull the hard drive and then recycle the old machine. Destroy the hard drive.
Sensitive data: passwords, bank information, credit card information, etc.
We used a program at work...can't remember the name, but it will wipe everything, unrecoverable by even the best. Just reformatting will still allow someone who knows what they are doing to find it. Basically the program writes over ever sector, so they can't be recovered.
Too bad future generations aren't here to see all the great things we are spending their $$ on!!
Another method would be to only use an encrypted OS with strong encryption on a new machine. That method will keep your information unreadable except to the NSA. Then whenever it is time to discard the machine, reload your OEM OS. If the NSA is interested in you, give it up and defect.
My daughter works for the NSA and she is evil.