On a Mac computer, Gatekeeper prevents you from installing unknown and potentially malicious applications.
You can control its settings by going to Finder > Security & Privacy then clicking the General tab. The Gatekeeper settings are at the bottom, here.
Gatekeeper severity settings
The tightest Gatekeeper setting, Mac App Store, allows only apps downloaded from Apple’s Mac App Store to be launched.
Mac App Store and Identified Developers also allows you to install apps from Apple-registered developers.
Anywhere allows all apps, except those that Apple knows are malicious, which will still be safely blocked for you.