Start by reading this:
Apple - Support - Backup
Then look at
SuperDuper to create a fully bootable copy of your current contents.
As a simple thing, if you have an external HD, then just drag all of your documents onto that drive. Properly unmount it, move it to another computer or unplug and plug it back into your Mac and confirm the data is proper and intact.
Once all that is done, if your Mac is one that came with Lion or Mountain Lion, then you didn't get installation media and were supposed to use the Recovery Console to re-install. But since you can't get into it, your options are limited. If your purchased Mountain Lion, you might have to go to a friend's Mac that has the Mac App Store and login with your Apple ID and re-download Mountain Lion. Then use
this article to to make a bootable version of the installer. Now use that to re-install ML on your Mac..
The other, easier option, is to visit your local Apple Store, tell them you want to re-install ML and with your Apple ID they can confirm you've purchased it and they will put things back in order..