A histogram is
My camera’s light meter measures how many light and dark pixels (luminosity) there are in a scene and displays them as a histogram. The blackest pixels, or the shadows, are displayed on the left, the whitest pixels, or the highlights, are displayed on the right and the other shades in between in a 256 step scale. The midtones, displayed at 18% grey are in the centre. The taller the graph is, the more pixels of that tone are in the image.
If a pixel is totally black it will be shown against the left axis and it cannot be corrected in Photoshop or Lightroom. If a pixel is totally white it will be shown against the right axis and again it cannot be corrected. This is called clipping and is best avoided.
If the photo being taken is under-exposed the histogram will be mostly to the left, if it is over-exposed it will be mostly to the right. A correct exposure displays a histogram with a good range of shades throughout.
It is always worth checking the histogram on the camera to see if all of the tones are where they are expected to be. Low key images should display a histogram with most of the tones to the left and a high key image should display a histogram with most of the tones to the right. Cameras try to automatically produce photographs with a good range of midtones so particularly when taking low key and high key images exposure settings may need to be adjusted manually.
Histograms also give an indication of the amount of contrast there is in a photograph. A narrow histogram generally reflects an image with less contrast while a broad histogram has more contrast. Contrast has darker shadows and brighter highlights to ‘pull out’ texture in an image.