A JPEG file is an image saved in a compressed graphic format standardized. It gets its name from Photographic Experts Group. It supports up to 24-bit color resolution color images and its compressed by lossy compression. Lossy compression greatly reduces the image resolution if it is used to much. JPEG files are images created using a lossy compression algorithm, which actually destroys some data contained within the original image file. A JPEG file also contains metadata that describes the contents of its file like the color space, color profile, and image dimension information.
A RAW file is an image generated by digital cameras such as Panasonic, Leica, and Casio cameras. Raw files are generally large in file size so that it contains , minimally processed data with lossless quality. It would be able to take the direct image without alternating the photos and keeping it as accurate as possible. It can finally store the most details of captured images.