Go to the Mac App Store (10.6.6 or later), and find Mac OS X Yosemite (Which is now El Capitan). Click “Download” or “free” and install. After it downloads, follow the installer instructions