Hi Doyles1901,
If your iMac is requesting a System Lock PIN code, a previous owner locked the iMac through Find My Mac. You must enter this PIN code in order to use your Mac normally again.
If you want infinite guesses at the PIN code, provided that a firmware password wasn't already set earlier, hold down the Option key as you turn on or restart your Mac. Release the key when a padlock and a password field appears. You can now take infinite guesses at the PIN code. To exit, force your Mac to power off by holding down the power button. If you guess the correct code, you will see a selection of startup disks to boot. Use the arrow keys to select your iMac's internal drive (usually named Macintosh HD) and hit Return. Use the same PIN code to unlock your Mac.
Or, you could also take your iMac to the nearest Apple Store or Apple Authorized Service Provider to get the lock removed. Bring proof of purchase with you if you have it.