Before you restore your iPod to factory settings, make sure you are 100% sure you want to erase everything as you will not be able to recover this data later!
How to do it
Plug your iPod into whatever computer you want to be the 'primary computer' for this iPod. I would suggest making sure you do this on whatever computer you will be transferring most of your music from.
Next open iTunes and click on the 'Restore' button and allow iTunes to do its thing.
You now have yourself an iPod with a clean slate. No music, no videos, no pictures and the same settings it comes with out of the box. You can now give away your Apple iPod without having to worry that somebody will be able to see your old files.