Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
Mac OS X 10.5.8 Leopard is very old and the latest version is Mac OS X 10.11 El Capitan. Click on the Apple icon at top the top left and select About This Mac. If the processor is Intel (like Intel Core 2 Duo or Core Duo), then you can upgrade the OS X from version 10.5.8 to 10.6.8 Snow Leopard
You need to upgrade to Mac OS X 10.6 first then only latest 10.11 El Capitan can be installed if supported. The base OS X requirement to install 10.11 El Capitan must be atleast 10.6. 10.11 can't be installed directly from 10.5.8
To upgrade to 10.6 Snow Leopard, you need to buy the Mac OS X 10.6 Snow Leopard discs. You can't download it from internet. You need to buy it as disc.
You can buy the 10.6 Snow Leopard disc from here --> http://www.apple.com/shop/product/MC573Z/A/mac-os-x-106-snow-leopard
When you get the discs, just put it on your Mac and follow the onscreen instructions to upgrade. It is easy.
After upgrading to 10.6 Snow Leopard, click on Apple icon and select Software Updates. Do all software updates there. Then click on Apple menu and select App Store (you will find App Store option after upgrading to 10.6.8). Then in App Store, click on Updates and you will find the latest 10.11 El Capitan.
If your Mac support 10.11 El Capitan, then you will be able to download it from there for FREE.
If you have any questions or would like any additional information, please don't hesitate to ask.