You don't mention whether you are using a mac or windows machine...
When you format your hard drive everything on it is totally erased.
When you restore it, you restore your operating system only (I'm assuming you are using the OS restore files not restoring from a backup because if you are restoring from a backup then there isn't much point...you will be restoring all the cruft, too). If you have a backup on an external drive, and are on a mac, if you have a time machine backup, you can restore the OS and then boot into the time machine backup and restore all of your apps and files (minus system settings) and you will be in good shape. This can take a while but it works fine.
If you are using windows, there is probably a similar procedure but you should get comfortable with it before you format (in either case).
I am using a mac, I did my time machine backup on an external hard drive. Thank you.
You're in good shape then. Do your clean install of the new OS X and then use the migration assistant to put back all your apps and files from Time Machine.