JPG is best for small photo files like those used on websites and emails, while TIFF allows for lossless compression and editing of high-quality image files. Raster graphics represent images as a grid of pixels and store location data implicitly, while vector graphics use geometric shapes defined by mathematical expressions rather than individual pixels, allowing for scalability without quality loss. Both file types have advantages and disadvantages such as resolution requirements for raster images and thin line disappearance for scaled down vectors.