GIF files have an advantage over JPEG files in that they allow you to set sertain areas as transparent. This means you can create silhouette effects to place in any design of the Web page backgrounds. The transparent areas in a GOF file are completely invisible.

The three images above shows that, in the most left image is the original image, the following image shows how the background is set to tranparent ( gray and white checkered squares indicate the background is transparent). And finally the last image shows how the extracted image is place over a new orange background.
Steps to Create:
1) Open any image file you like in Photoshop
2) Select the Area to be transparent (The selection tools include Magic Wand tool and Marquee Tool) , then press the ‘delete’ button on the keyboard
3) Inverse your selection, by choosing Select > Inverse in the main menu
4) Select Edit > Cut in main menu
5) Go to File > New, and a pop-up dialog appears. Select the width and height of the image you want, as shown in the first red circle. Then Select Transparent as shown in the second red circle. Press OK to create the transparent image background, and Select Edit > Paste onto the background
6) In order to save your image as GIF, select File > Save For Web , and a pop-up dialog appears, follows the settings for GIF in the Fig 1 below, and click Save. You are done. And now, you can paste your transparent GIF in any kind of background you want.

Fig 1