When saving a file using the File > Save As... menu entry, you can either select a particular file format in "Save Options", or you can choose "Save by Extension". This simply means that GIMP will save the file using whatever format relates to the extension that has been given to the filename — for example, typing foo.jpg would save the file as a JPEG.