Raster graphics are composed of pixels arranged in a grid, while vector graphics use shapes that can be edited individually. File formats like JPEG are commonly used for photos due to their small file sizes, though quality degrades with edits, while TIFF maintains quality but has slow loading speeds. Vector formats like AI and PSD allow high quality editing but require specific software. Optimizing images and naming files accurately helps organize and reduce file sizes for sharing graphics online.