You can connect the controller by either USB or Bluetooth. Macworld offers a good step by step instructions for both.
"...1.Use a Micro-USB cable to connect the PS4 controller to your Mac.
2.Press the PlayStation button in the middle of the gamepad (to turn it on).
3.Choose Apple > About this Mac.
4.Click System Report.
6.Look for Wireless Controller under USB.
1.Open System Preferences (Apple menu > System Preferences).
3.Put the PS4 controller in Discovery Mode by holding down the PlayStation button and Share button at the same time.
4.The light on the front of the controller will flash quickly, and Wireless Controller will appear in the Bluetooth window. Click Pair...."