What operating system is currently on your Mac? Apple menu -> About This Mac.
You may need to upgrade to the latest release of what you already have on your Mac:
Pick the appropriate browser to make the download:
Browsers by Mac operating system - Apple Community
For 10.6.x
Combo v1.1 (7/25/2011), 10.6.8 2013 Security Update 004, 2013-005 Java update (note Java is not current until Mac OS X 10.7.3 from Java.com, and requires losing compatiblity with Rosetta Then open Apple menu -> System Preferences -> Software Update to get the Mac App Store update (you might need to set the computer's date and time to some point in 2012.
For 10.7.x
10.7. 5 Combo, Supplemental to both Combo and Delta and 10.7.5 Security Update 2014-004 followed by 10.7. 5 Bash update.
For 10.8.x
10.8.5 Combo (supplemental update of October 3rd already included), 2015-006 Mountain Lion Security Update
For 10.9.x
10.9.5 combo and 2016- 004 Security update
For 10.10.x
10.10.5 Combo and Security Update 2017-003 Yosemite
Lastly the installer for El Capitan is here:
How to download and install macOS - Apple Support
You may find the El Capitan installer needs the system time to be set for:
September 20, 2016
No newer OS can be installed on your Mac without serious stability issues. Get a Snow Leopard retail or later installed system supported by your Mac on a hard drive to clone over if needed.
Snow Leopard Retail looks like
And does not say Upgrade, OEM, or Dropin.