Make sure your Mac also has: OS X Mavericks, Mountain Lion, Lion, or Snow Leopard v10.6.8, already installed2 GB or more of memory8 GB or more of available disk space. Select App Store from the Apple Menu to open the App Store, then click the Download button for OS X Yosemite in the App Store window to begin installation.
Even if you are still running Mavericks, you can upgrade to mac OS Sierra. If your Mac is from early 2012 or older, you might want to consider whether upgrading is worth it. Before downloading any major update to your Mac operating system, it is very important to back up your data.
Since OS-X Mavericks (10.9) Apple have been releasing their OS X upgrades for free.
This means if you have any version of OS X newer than 10.9 then you can upgrade it to the latest version for free. Method 1 is Apple’s suggestion method, but if you have more than one computer it requires you to download the OS X update more than once.
Method 3 gives you a thumb drive that you can use multiple times to install OSX, and you can even boot off it in an emergency if your hard drive crashes.
It is very handy to have a bootable version of the latest OSX on a thumb drive lying around So I suggest option three This article tells you how to make a USB thumb drive installer so you can upgrade any computer to the latest OS X.
Before you install Yosemite be sure to check you have the right Mac.