if yours is a PPC (G4 or G5) iMac you can upgrade only as far as Leopard 10.5.8, which on eBay or Amazon can cost up to $200.
If yours is an Intel based iMac you can go directly to Snow leopard 10.6.8:
Start by checking if you can run Snow Leopard:
Requirements for OS X 10.6 'Snow Leopard'
http://support.apple.com/kb/SP575
(NB: PowerPC applications can still be run in Snow Leopard using Rosetta, but they will not work in later versions of OS X.)
The OS 10.6 Snow Leopard install DVD is still available for $19.99 from the Apple Store:
http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
and in the UK:
http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
but like Leopard, Snow Leopard is no longer supported by Apple in terms of security updates.
When you have installed it, run Software Update to download and install the latest updates for Snow Leopard to bring it up to 10.6.8, or download the combo update from here:
http://support.apple.com/kb/DL1399
Check via Software Update whether any further updates are required, particularly to iTunes (you will need the latest version in order to synch with mobile devices).
You should now see the App Store icon in iTunes, and you now need to set up your account:
http://support.apple.com/kb/HT4479