Macs have a feature called "GateKeeper" which prevents applications downloaded from the internet from installing.
You can override this by right clicking or CTRL+Clicking on the pkg file and selecting open. You will then get another warning dialog, but it will now display an option to open the installer anyway. Select Open on this dialog and you will be able to install as normal.
Alternatively you can change your Security settings permanently by following the steps below:
1. Click on the Apple logo in the top left.
2. Select Preferences.
3. In the Preferences window select Security & Privacy.
4. Click on the Lock to make changes and change the "Allow applications downloaded from:" settings to "Anywhere".