A mugshot is a police photograph taken of someone who's been arrested. Most mugshots are taken as soon as a suspect is brought into a police station, and they don't tend to be flattering.
The term mugshot is an informal name for what's officially called a "police photograph" or a "booking photograph." Taking a picture of every arrested suspect became standard procedure in the late 1800s, not long after the invention of photography. Mugshots include both a front view and side view of the arrested person. This police tool came to have this nickname mugshot from the informal meaning of mug, "face."