A dark patch formed on a surface behind an opaque object placed in the path of light is called a shadow. A virtual image is formed by reflection of light from a plane mirror (virtual image) or spherical mirrors or by refraction in lenses (both real image and virtual image). The image formed by a pinhole camera is due to the rectilinear propagation of light.
Let us compare shadows and image formed by a plane mirror.
Shadows are black, whereas images are colourful. Shadows of objects placed in the sun change in length with the position of the sun through the day. Your shadow will be at its longest at dawn and dusk, whereas it will be at its shortest at noon. An image in a plane mirror doesn’t change in size at all; it is always of the same size as that of the object. An image in a mirror can be seen without a screen, whereas it is mandatory to have a screen to form a shadow.