How do you save an image as an icon?

Open your image with an image editor (photoshop, gimp, ...) that supports saving as an icon.

First you have to resize the image to a size that is compatible with an icon. For example 32x32 or 16x16 pixels are typical icon sizes. Then you have to reduce the number of colors to 256. Now your image has the properties of an icon and can be saved to an icon by File/Save As/ and select the icon type.