The vectors can be simple shapes paths or well just about anything you can do in Illustrator. A rectangle with opacity. The best format for serving vector images is SVG which uses a markup language to describe the image.
Its an image format that has more in common with a web page that it does with a JPEG.
SVG is lightweight scalable and crystal clear on any displays. You can find this example live on our Github repo as vector-versus-rasterhtml it shows two seemingly identical images side by side of a red star with a black drop shadow. PNG-24 exports a crisper image than PNG-8 because it saves an image with more colors but the file size can be much larger. To give you an idea of the difference between the two lets look at an example.