When preparing to sell or give away your Mac, you may want to erase some or all files from its hard drive. But first determine whether you should back up your computer and disable certain features and services. These steps show the recommended sequence of actions.
There's no may want to about it. You do want to erase your hard drive before it departs your home. The above quote comes from an Apple support document outlining recommended steps for preparing your Mac to be sold or donated. The process can be summed up by signing out of your internet accounts, backing up your data, and then erasing the computer's hard drive. It's that last step that most users have issue with, but thankfully Apple makes it fairly straight forward. If it's your first time, I recommend printing out those instructions rather than trying to do it from memory.
If the computer is more than ten years old, it won't hold any value and should just be recycled. (Certainly don't throw it in the dumpster.) Do a web search for local electronics recylcers. Most of these outfits include free hard drive formatting. As usual, if you need a hand, feel free to let us know.