Do you have Xcode installed? If not go to the Apple Development Site, and sign up to download Xcode. For now just sign up for a free account. If you want to test your game on your ipod or, submit your iphone game to the app store you will have to have a paid subscription.
Put your cocos2d download in a folder where you can get at it. Now open the application folder, scroll down to utilities.
In terminal type cd and then drag the folder in to the terminal and hit the enter key.
Then type “sudo install-templates.sh -f”.
If you have a password for your computer it will ask you for it.Note that you will not see any of your password on the screen. Just type in your password and hit enter.
Cocos2d should install
Now open XCode and start a new project.