To use the Sixaxis, Navigation, DualShock 3 & 4 controllers, you must first pair them to the device you would like to use them with. This must be done with a Mini-USB cable and PC running windows.
To do this, first download and install the setup program below and follow the instructions.
Once installed, run the program by clicking on its shortcut from the start menu. A window will appear that contains a line reading Current Master: Searching... You can now plug the controller in via the USB cable and the text should change from 'Searching' to some text in the format xx:xx:xx:xx:xx:xx. This is the bluetooth address of the device that the controller is currently paired with. To pair the controller with your phone, you need to know its bluetooth address. This address will be displayed at the bottom of the 'Sixaxis Controller' application on your phone after you have clicked the 'Start' button. Once you have this address, you should enter it into the SixaxisPairTool exactly as shown, then click the 'Update' button. The 'Current Master' should now match the address of your phone and you can move on to the next step.
Download link: SixaxisPairToolSetup-0.3.0.exe - [Size: 12.9 MB]
For those having problems with the latest version, please try this old version. You must have the controller plugged in when you run the installer: SixaxisPairToolSetup-0.1.exe
Alternatively, there is a utility for linux, called 'sixpair', that you should be able to find floating around the internet.
Command line utility version of 'sixpair' for OSX can be downloaded from here. Modified source code can be found here. This utility requires libusb, which can be downloaded from http://www.ellert.se/twain-sane/. Choose the binary for your version of OSX.