Your machine might have 10.7 or 10.8 installed by default, so there is a Interet Recovery option.
Hold the Command Option R and boot the machine on Ethernet or connect to Wifi, then enter your AppleID and password and install OS X.
You can later upgrade to a later OS X version (if applicable) in the AppSnore under the Apple menu.
If not, your going to have to find the serial number of the machine.
https://support.apple.com/kb/HT1559
Next punch the last 3 or 4 digits of the serial number into this website to find the model/year and model identifier (something like MacBook Pro 4,1)
http://www.everymac.com/ultimate-mac-lookup/
What you need to know is what operating system version originally came on the machine from the factory, not when you purchased it. (MacTracker will you this, but it only runs on a Mac, not a PC.)
Mac's that came with 10.6.2 or earlier (including 10.4 and 10.5) can use the 10.6 white retail disk
Mac's that came with 10.6.3 or later need machine specific disks from Apple by calling them and providing the serial number.
Mac's that orginally came with 10.7 or later cannot use the 10.6 disks.
If your Mac model is pre 2010, then you should be good on the 10.6 white disks, if 2010 or later then it's more likely you need machine specific disks from Apple.
Details here.
How to reformat a used Mac