Underwater photography is much the same as land photography; that is, it is the art of capturing the light onto the sensor. The issue with underwater photography is that light behaves very differently underwater than on land. The major factors effecting the light are refraction and absorption.
JPEGs are a compressed file format that is the most widely used and transferable image format. It is so popular as it is small and easily portable. JPEG files though are called a 'lossy' format though. They are called this as the JPEG file will slowly degrade in quality the more it is edited and saved. A RAW image though is exactly that. It is an exact copy of what the sensor of the camera detected at the time the image was taken. This means that the image data is stored fully allowing for later processing to be completed without degrading the images.