Let's assume you are using pre-OSX: Just delete everything from the hard drive except the contents of the 'System' folder. This will strip everything (documents and applications) from the computer.
If you really want to clean up, you will need to destroy the system folder as well...
First, you need a system disc (CD-ROM). The system disc would act like a DOS boot disc so that you can do further work after you trash the hard drive. You wouldn't try to reformat a Wintel computer without one of these, would you?.
The system disc also has disk tools to format and partition the hard drive. To use these, you should boot from the CD by holding the 'C' key.
If you are wiping the computer for security reasons, you should download a wiping utility so that the data cannot be recovered. Formatting and partitioning will not remove all data alone.