JPG-S means an image is saved with 1:9 Compression Ratio. The quality of the image will be slightly lower but the file size will be smaller. This is good when you are running low on your memory card storage.
JPG-M means an image is saved with a 1:4 Compression Ratio. The quality of image and file size will be moderate. This is good for regular scenes.
JPG-L means an image is saved with 1:2.7 Compression Ratio. The quality of image is the highest out of the three but also has the largest file size. Select this if the highest image quality is desired and memory storage is not an issue.