The firmware password prevents starting from any internal or external storage device other than the selected boot disk.
To protect data on your Mac, you can set a user account password (password to log in) to prevent other users from unauthorized access to your account. You can also encrypt a boot disk using FileVault so that only users who log on to a Mac can read data from this disk.
For even more reliable protection, you can set the firmware password. Users who do not know the password of the firmware will not be able to start the computer from any disk other than the one designated as the boot disk. Thus, it will be impossible to use some shortcut keys at startup.
If you Forgot your Firmware Password
Bypass Firmware Password on any MacBook or MacBook Air, or iMac it’s a very dangerous and hard procedure. If you cannot remember the firmware password or pass code, reserve a personal meeting with an Apple Store Members or an authorized Apple Service Center. Bring your Mac and your original receipt or invoice as proof of purchase.
Read more: How to Reset Mac to Factory Settings?
Solving the Problem by Yourself
It is extremely important to understand that rolling back the EFI firmware is the MOST dangerous operation that you can do on a Mac. If you confuse the image of EFI firmware and initiate an update with firmware from the wrong generation or, even worse, from a different Mac model, it will not end with anything good, and even in an authorized service center you can hardly be helped. The computer risks to stop turning on altogether, once and forever.
In general, I warned you and I strongly recommend to contact the authorized Apple Center to solve this problem. Please, don’t try to reset Mac Firmware Password by yourself!