JPG is a image file format and PDF is a document file format. PDF files can hold images as well as text. Both of these file format are very portable and is used as preffered file format in many occations.
JPG is a common file format used on Scanners and Digital Cameras. The reason is that JPG format allow high compression of image data without loosing much of it's perceptive quality.
PDF is another very common file format. It is the predecisor of PostScript and allow much higher quality when it comes to printing documents.
JPG and PDF are two of most widly used file format. Virtually all operating systems and browsers support these formats out of the box.