To create icons - use Photoshop or other image editing software to create images with transparency that have the dimensions 512*512. Open Icon Composer (installed with the Developer Packages of OS X). Find it here:
Drag the image in and have it create all the different sized images necessary for the icon.
After you have saved it you have to use Icns2Rsrc or a similar program to convert the .icns file to a resource file containing a 'icns' resource. In other words to get the picture to show up as the icon.