Photoshop logo JPEG and zoomed in section showing individual pixels
Raster images can display a wide range of colours and are ideal for photographic images. However when a raster image is enlarged the pixels become bigger and more obvious. This causes edges to become jagged, especially curves.
Vector images are created using sets of co-ordinates joined by lines. This means that the image can be enlarged by moving the points without affecting the quality of the line
Cartoon created in Adobe Illustrator and zoomed in section at 2400%, the line is still sharp
Vector images are very useful for creating line art such as the above cartoon and for logos and icons. However, they are limited when trying to display graduated shades of colour.
Sunset image as a jpeg compared to a vectorised version created in Illustrator
For more information on vectors and rasters, have a look at this video from vector.tutsplus.com.