XCF is the format used to save layer information. While you are working on an image, you should periodically save it as an XCF image so that, if necessary, you can load it again in the future with all the layer information intact. Saving images can be a little complicated. For example, if you try to save an image as a TIFF file you might find that only part of the image gets saved. When specifying any format other than XCF, the GIMP will save only the currently active layer unless you flatten or merge the visible layers of the image.
Some file formats are meaningful only with certain image formats.
An RGB image contains more information about an image than the GIF format holds, so RGB images cannot be saved in the GIF format. If you wish to save the image as a GIF, the image must first be converted to an indexed format. The image is converted and is now ready to save as a GIF file. Note that converting from RGB to GIF means that some of the information in the original image may be lost, although the loss may not be visible. If you wish to enlarge or resize the image later, you should first save the flattened image as a TIFF file.