Vector graphics are based on mathematical formulas and can be scaled without losing quality, while raster graphics rely on pixels and can become pixelated when enlarged.