Apple has made its operating system OS X Yosemite available free of charge for Mac users. Simply go to the App Store app and search Yosemite to download the upgrade.
Before upgrading to a new operating system, make sure your Mac fills the OS's system requirements and backup any important files. Small upgrades to your OSX operating system are available free of charge by clicking the apple in the upper left-hand corner of the screen, selecting "About This Mac," and clicking the "Software Update" button. It is unknown if Apple's next OS, El Capitan, will also be free, as Apple's operating systems usually cost around $30-40.