You can do what you are asking but this sounds like a pretty drastic procedure. May I ask why you would want to wipe the disk and computer clean and start again? There are lots of things you can do to restore a Mac to health without starting from scratch. What are the problems you are trying to fix?
There are a few nondestructive actions one can take to restore the health of a Mac. Once you give an idea of what problem you're trying to solve I (and others) can post simple instructions on how to perform some safe procedures.
For example, you can check and repair the health of the filesystem using Disk Utility. There could be other issues with your system where reseting some hardware would help (PRAM and SMC). You can start in Safe Mode. You can reinstall OS X over itself without deleting your data. All of these are straightforward procedures that do not require much expertise.
Before you upgrade an OS, reinstall and OS, or make other major changes to your software you should backup your system, preferably twice. The easiest method for this is using Time Machine to backup to an external disk drive.
Please post the symptoms of the problems you are trying to fix.