Mac OS X 10.5 "Leopard" is $129, available from retail outlets the world over. Your best bet would be your nearest Apple Store, but the big online retailers (
amazon.com, buy.com, etc.) also have it. Make sure your computer is up-to-spec with the system requirements:
http://www.apple.com/macosx/techspecs/
You have three choices of installation:
1) Archive & Install -- preserves your applications and user accounts and installs Leopard.
2) Upgrade Install -- preserves all your applications, user accounts, settings, etc. and upgrades you to Leopard.
3) Clean Install -- erases everything on your hard drive and installs a fresh copy of Leopard. Doesn't preserve anything, so make sure your files are backed up.