Restart with the Option, Command, and R keys held down, and install the OS.
If this installs Lion, you’ll need to separately upgrade to Mountain Lion or El Capitan.
If the computer’s firmware is too old for that shortcut, install an OS from a DVD or thumbdrive and then upgrade.
(163710)