Vector graphics store the coordinates of points and curves as math. Zoom in as far as you like and the shape gets recalculated and redrawn every time, so the outline always stays crisp. A raster (bitmap) image is the opposite — a fixed grid of pixels with color already baked in — so enlarging it past its original size just stretches each pixel, and the steps become visible.
That's why a logo's master file should always be a vector format (SVG, AI, EPS): the same file scales down to a business card and up to a building-sized banner without any loss. Photographs, on the other hand, are essentially impossible to describe as vectors given their color and texture complexity, so they stay raster (JPG, PNG).
A common mistake in practice is someone downloading a logo as a PNG from a website and treating it as the master file. Scale that PNG up again and it develops blur and blockiness that would never have happened starting from a vector. Whenever a logo is handed off, the source vector file should always be identified alongside it.
When to use
Always keep the master file as a vector for anything — like a logo or icon — that will be reused at many sizes. Photographs, with their complex color and texture, belong in raster.