If you were running Snow Leopard (10.6.8), and bought the Mac new, it came with two gray discs. One is marked "OS X Install DVD." If you bought the Mac used, the seller should have included the discs. If not, AppleCare can send replacements for a nominal fee. They'll need your serial number.
Snow Leopard was replaced by Lion in July of 2011; if you bought after that, it may have come with Lion, and has a Recovery HD (actually a hidden partition) that serves a similar purpose.
If you were running Snow Leopard, and Apple installed either Lion or Mountain Lion, you need to get the Snow Leopard disks and do the full restore as outlined. You won't be able to use Lion or Mountain Lion without paying for it. And it will be a bit tricky to install, as that's done over the internet.