You would have been running OS X 10.11.6 (El Capitan), so you can try booting to the recovery system, where you could reinstall the system you presently have. You can also try using Disk Utility, to run First Aid on the hard drive (might help) -- But, yes, Wowfunhappy has a good idea to do first, if there are important files on that 2012 MacBook Pro, and you don't have any backup of those files.
Do you know if the drive is an old hard drive (with a spinning disk), or do you know if the original hard drive has ever been replaced with an SSD? This would be the time to swap out an old hard drive to an SSD, as the old drive may be close to failure