You need to buy an upgrade if one is compatible with your Mac model.
PowerPC G3 Macs can only go to 10.4.11.
PowerPC G4 and G5 Macs can only go to 10.5.8.
Macs with a Core Solo or Core Duo CPU can only go to 10.6.8.
Core 2 Duo and better Macs can go to 10.7.5 or 10.8.3 depending on their model. Upgrading to either requires going through 10.6.
The earliest iBooks can be upgraded to run Panther. Later ones can be upgraded to Tiger; the latest production iBook, Leopard. Updates within all those versions are still available from Apple at no additional charge. Run Software Update. If no updates are available, your version of OS X is up to date.