In the Disk Utility from recovery mode (Command + R right after boot chime), resize the partition by adding another partition and changing the partition type to "free space."
Make sure your new partition has at least 10GB, but you probably want more for your Ubuntu installation anyway.
Wait for the disk utility to shrink your OSX partition, then when it's done rebootskii.
Right after boot chime, hold down the "Option" key, which is usually just the Apple word for the alt key.
Select your Ubuntu installation medium (CD/DVD/USB). If you're using a DVD you may have to wait up to 20 seconds for the medium to show in the list. It may say "Windows", but it's Ubuntu. OSX assumes any bootable medium is Windows out of fear or some shit.
In the Ubuntu installation, go up until it gives you the option to erase disk and install Ubuntu. Select "something else".
From there, you have to create a new partition, using about 6GB less than the size of the free space you created from OS X's recovery disk utility.
Next, create a 2048MB "swap space" out of the free space, and another 512MB "reserved BIOS boot space" (or whatever Ubuntu calls it).
Personally I use the ext4 format for storage in secondary OS's on Mac OS X, but it's been a while since I've done this. Make sure the mount point is at "/", then select that as your device for boot loader info (at the bottom.)
Now run it.
Once you've done the rest, you will notice that the boot menu for osx won't show your Ubuntu installation. This doesn't mean you messed up, it just means Mac OS X won't recognize the bootloader. You'll need external EFI software. Luckily there's a really nice EFI boot menu out there that will allow you to do this with ease. You can find rEFIt
[here].
Run and install rEFIt, rebootskii your mac. Let it boot into Mac OS X, get to the login screen, the reboot again.
Now rEFIt should be working. You may see four diagonal tiles, you may see Tux the Linux penguin. Use the arrow keys, and move over from the Mac OS X icon to whichever you see. Press enter, and it'll boot up Ubuntu.
Now you're free to customize whatever else in rEFIt, Ubuntu, whatever. Don't mess up your shit, but you have room to modify things.