You will need to go to the Apple online store and buy the upgrade to OS X Lion 10.7
http://www.apple.com/shop/product/D6106Z/A/os-x-lion
While you may be able to upgrade to a more current version of OS X, your Mac is too old to update to the most recent version, macOS 10.12 Sierra. The last version of OS X that may work for your Mac is OS X 10.11 El Capitan. After you upgrade to OS X Lion, the upgrade to OS X El Capitan is free.
OS X El Capitan - Technical Specifications
Late 2012 Mac mini, macOS 10.12; Watch, 38 mm silver AL, Watch OS 3; iPad Air 2 & iPhone 6+, iOS 10.0.2; Airport Express