JPG is the file extension for a JPEG file. JPEG is an acronym for Joint Photographic Experts Group, the name of the committee that created the JPEG standard.
It is an image file used for photographic images. It can be used for any image but the way it compresses file sizes is best suited to images with lots of colour and shape variations and gradations such as a photograph. The opposite would be an image with bold blocks of colour which other file formats are better at handling such as GIF or PNG image files.
The file format uses what is called lossy compression which means that it sacrifices certain details that the human eye has a hard time seeing in order to save on file size.