For the computer to access the online Mac App Stores and others, you'd need to upgrade
the computer to Snow Leopard 10.6 (and then 10.6.8) by use of retail DVD installer; and
that is available online from the Apple Store for about $20. The update to that installation
is a later download, to bring it up to 10.6.8; then it can access the online App Store.
And then, Mavericks 10.9 in no longer available there. If the computer can support 10.9,
it probably could also run Yosemite 10.10. However if there are indications it may not,
then you could buy a download code for about $20. (additional to Snow Leopard DVD) to
get Mountain Lion 10.8 from the Apple servers.
Be sure the computer is ready for an upgrade to a later OS X, and make sure you have at
least one complete backup of any files you want to keep. Some of them may not work or
won't work the same in a later system; you may have to purchase applications, also.
Good luck & happy computing! 🙂