When evaluating your erasure method, you need to consider:
- How quickly you need to erase the data (Is it an emergency response to terrorists banging on your door, or are you selling your old hardware on Ebay next week?)
- How much effort, money, or time will any potential attacker realistically spend trying to get at your data? (Are you a high-stakes target, or does someone just want to get your bank account details? Is your potential attacker a small-time crook or are they sponsored by a nation state or massive cartel?)
- How long will your data remain valuable -- will the threat go away after time?
- What have you got to lose? (Your cool? Money? Employment? People's lives? A war?)
If the stakes are unacceptably high, by all means go to extremes: erase data and destroy the medium; however, in most cases, plan to make any attack offputtingly difficult. Again, you have a choice: do you make it obvious to an attacker that it's not worth their bother (with a warning label or obvious damage), or do you let them try until they give up in frustration?
Examples:
1) You're handing your laptop down to your child for homework, having bought a shiny new one. They are not allowed to take it out of the house, and the battery doesn't hold charge anyway.
You're essentially still in control of the computer. If your operating system doesn't restrict you from doing so, create a fresh user account for your child. Move/delete your old files and empty your wastebasket. You want to hang onto an Administrator or root login so you can do maintenance, but if you can, delete your old user account from that computer.
2) You want to give your old home PC to charity. The charity is unlikely to attack, but you don't know where your old computer will end up. People poke around for fun sometimes.
You've got plenty of time to make backups of the data you want to keep and then do a fresh operating system install, ensuring you get it to reformat the hard disk the slow way, overwriting each sector to check for bad blocks.
(If your chosen OS doesn't allow this, you can always download a Linux liveCD, boot into that and use the dd command to copy data from /dev/urandom to the machine's primary disk, usually /dev/sda. This may take many hours. Be really sure that no other disks are attached whose data you want to keep, just in case you overwrite the wrong disk! Finally, install an OS so the machine will work.
3) You need rid of that data fast! Ruthless baddies are at the door and lives are at stake. Grab a hammer or electric drill and destroy that disk! Put as many holes and dents into those shiny platters as you can. Hard disk heads fly incredibly close to the surface of the disk, with very finicky accuracy. A head crash can be caused by a particle as small as a particle of smoke getting between the head and the platter while it spins. You are filling the drive with broken particles, deforming the mirror-like disk surface, pitting it, smearing magnetic material about, and likely shattering the platters if they are glass, as some are. Trying to mount this mess on a rig in a clean-room to get data off it is only going to damage the rig and contaminate the clean-room. Any remaining options for recovering random chunks of data from fragments are going to be preposterously expensive, impractical and reliant on luck, so you should have time to leg-it and take mitigating action just in case. (You're still going to be in trouble for not encrypting life-or-death data in the first place, though.)
I haven't covered SSDs - I don't know enough about them.