Computers really only understand ones and zeroes. Since it would be rather unwieldy to write your programs using only ones and zeroes, there are programming languages like C which are a more memorable text representation of a program, usually referred to as source code.
To write a program, one needs a text editor, and to translate this text representation of a program into actual ones and zeroes that the computer can run directly, we need a compiler. On the Mac, you usually use a program called Xcode, which is a text editor that integrates a compiler called “LLVM”.
If you’re just starting out with programming, you should get Xcode from the Mac App Store, for free. This is the full version of Xcode, but you will not be able to upload your finished application to the Mac App Store until you buy a one-year Mac Developer membership from Apple’s Developer Site.
Xcode has a few extra things it installs when you first run it. So after you have downloaded Xcode (it is a bit big, over 3GB last time I checked), just find “Xcode” in Launch Pad and click it. It will ask you to install some stuff, just let it do that.
This tutorial is for Xcode 4.4. Xcode changes a lot between versions, so make sure you have the newest version or it might be hard to follow along.