Your computer has a firmware password set and you won’t be able to boot into any other OS unless you know/remember the password. If you do not remember setting that password, you have a few options:
1) If you bought your computer directly from Apple, they can remove the firmware lock for you.
In this case, you can go to the nearest Apple Store or Apple Authorized Support center and they can remove the firmware key. Before you do that, it’s a good idea to backup your data from both macOS and Windows partitions. You can use TransMac to access macOS partitions from Windows. You will also need to provide proof of ownership of the Mac which has a locked firmware password in order for them to unlock the computer.
2) If you bought it online from someone else (i.e from Amazon)
You will have to contact the seller and ask him/her the firmware password. He/She can tell it to you and you can then remove the firmware password from Recovery Mode.
Way to boot into macOS without firmware password (Requires macOS Sierra or earlier)
Go into Bootcamp Helper control panel and there should be an option to select between OS X and Windows. Select OS X and press Reboot (or save and restart).
Source: http://osxdaily.com/2015/01/28/forgot-mac-firmware-password-what-now/