You may follow these steps below:
Make sure the Bluetooth on your phone is switched on
Tap "MENU" button on the radio
Turn the knob until you see the word "SET UP"
Click on the Mazda option in the Bluetooth connections page on your phone
Copy the pairing code shown on the radio
You're paired!
Do note that not all phone models work for all the Mazda's Bluetooth connection.