Files that you work on in GIMP are saved in the XCF file format which allows you to build up images with multiple layers, but when you have finished working on your image you may need to save it in a different file format.
If you are using a simple graphic in a web page, a GIF file may be appropriate. GIMP can be used to produce such files.
1. Save As Dialog
You can use both Save as and Save a copy from the File menu in order to save a file as a GIF. They do basically the same job, though using Save a copy will save a new file, but keep the XCF file open in GIMP whereas Save as will automatically switch to the new GIF file.
In the dialog, click on Select File Type, just above the Help button, and select GIF image from the list of file types.
2. Export File
If you're saving a file with features that aren't supported by GIFs, such as layers, the Export File dialog will open. Unless you've specifically set up your file to be an animation, you should select Flatten Image.
GIF files use an indexed color system, with a maximum limit of 256 colors. If your original XCF image contains more colors, you will be offered the option to Convert to Indexed using default settings or Convert to Grayscale – in most cases you'll want to select the former. When you've made the necessary selections, you can click the Export button.
3. Save as GIF Dialog
As long as you're not saving an animation, then this step is very simple. You can select Interlace, which will produce a GIF that is loaded progressively, but in most cases this is unnecessary. The other option is to add a GIF comment to the file, which could be your name or information about the image that you may need in the future. When you're happy, click the Save button.
You can now use your GIF version of your image in a web page. If you need to make any changes, you can return to the XCF version, make your amends, and resave it.
Note: If your GIF looks poor quality with lots of spots and obvious areas of different colors, it may be that you'd be better off saving your image as a JPEG or PNG. GIFs can only support 256 individual colors and so are not suited for photo type images.