First we need to download raspbian, you can grab the latest version at https://www.raspberrypi.org/downloads/
Direct url: http://downloads.raspberrypi.org/raspbian_latest
Now we need unzip the file: 2016-02-06-raspbian-jessie.zip:
unzip 2016-02-06-raspbian-jessie.zip
You will get a file named 2016-02-06-raspbian-jessie.img, this file must be written to your micro-sd card.
Download and install the SD Association's Formatting tools from https://www.sdcard.org/downloads/formatter_4/eula_mac/
Select "Overwrite format", Make sure you have selected your SD Card, and not something else Click "Format"
First, look at the partition table by running this command:
diskutil list
You should see something like this:
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *16.0 GB disk1
1: EFI 209.7 MB disk1s1
2: Apple_HFS Example 15.7 GB disk1s2
The partition we want to change is /dev/disk1.
We want to change the device to an MBR-formatted FAT32 partition. To do that, run this command:
sudo diskutil eraseDisk FAT32 [NAME] MBRFormat /dev/disk1
Where [NAME] must be written in CAPITAL letters; otherwise, this will not work.
As mentioned in the comments, you cannot put square brackets into the volume's name lest things mess up. To avoid having everything fail, simply ensure that there are no square brackets in the FAT32 volume's new name.
Formatting an SD card is quite straight forward with Mac OS X. Start by pressing CMD SPACE to reveal the Spotlight search bar at the top right hand side of the screen. In this search bar, type disk utility and press return to launch the Disk Utility application.
Select the SD card, in the left hand pane, and then select Erase ensuring that the format is MS-DOS (FAT).
Flashing an SD card is quite straight forward with Mac OS X. Start by pressing CMD SPACE to reveal the Spotlight search bar at the top right hand side of the screen. In this search bar, type terminal and press return to launch the Terminal application.
Insert the SD card into your Mac’s SD card drive.
To find the connected SD card, in the terminal window type:
diskutil list
Make a note of the identity of yours. In my example it is /dev/disk2 but yours may be different.
If the SD card was automatically mounted, as mine way, you will need to unmount it with the following command in Terminal. Remember to correctly identify your SD card if it is a different number to my example.
diskutil unmountdisk /dev/disk2
Navigate to the location that you downloaded and extracted the .img file from the .zip download. In my case it is the Downloads directory.
cd Downloads/
TIP: The dd command is very powerful and you risk serious corruption to your Mac if you use it incorrectly. Triple check your command before executing it, or use a different method (described below) to flash your SD Card if in doubt.
You'll be shown a message that your SD card has been unmounted. Its disk image will disappear from the desktop.
Here's where you want to pay close attention. We want to type in a command such as:
sudo dd if=~/Downloads/2014-01-07-wheezy-raspbian.img of=/dev/disk2 bs=2m
It will then take a few minutes to flash the SD card during which time no progress information will be shown. Be patient. On completion, you will get a confirmation with some information displayed in terminal.
You are now free to unmount the SD card for use in your Raspberry Pi.