You can upgrade to OS 10.11 (El Capitan).

Simply open the App Store app on your Mac. Search for “OS X” or “Mac OS”. “El Capitan” should appear, ready to download and then install.

(If your Mac was slightly newer, then “Sierra” instead of “El Capitan” will appear in the App Store. El Capitan is not available through the App Store for Macs that are supported by Sierra.)