This is the semi-technical stuff that you have to know about how graphics are implemented on the web. I am assuming that you already have a suitable graphics editing program and are at least partially familiar with it. Or you may already have a suitible program that was supplied with something like a scanner. Use the JPEG format when the image is a photograph, painting, or something like that. The GIF format is limited to 256 colors.
All graphic images are rectangular in shape.
The GIF format allows you to display an irregularly shaped object without having its backround show. Check the documentation to your graphic program to see how to do this. If you need a photograph to have an transparent background, then you have to use the GIF format. Yes, even though it is limited to 256 colors. The JPEG format doesn't support transparent backgrounds.