I have a pretty good grasp of the histrogram in my cameras. I know if that any pixels found at the far left are a value of 0 and lost shadow detail. Pixels on the far right are 255 pure white and are basically blown out highlights.
What I don't understand is whether it means anything to have "spikes" in any other range between left and right.
For example, I've read that in terms of vertical space on the histogram, it just means "how many" pixels are in that tone. But what does that mean? How many pixels are there from top to bottom? I don't get that. Is it matched to the resolution of the shot?
If my shot is 4000 pixels tall (24mp) does that mean there are 4000 points from the top of the histogram to the bottom?
I guess the question is, what does it mean if you see spikes in the midrange of the histogram, that is to say, the graph smashes against the ceiling. Is this a bad thing that needs compensation or is it meaningless? What is the real differences between a spike that goes half way up and one that hits the top?
Thanks
The height in the histogram is 1) relative, and 2) meaningless. The data will ALWAYS reach the top. All real data
histograms are intentionally scaled so that the maximum height does reach the top (or very very close). The purpose is to make the data taller and easier to see low values, to be able to see WHERE it is horizontally, tonally. The height is just the count of the pixels, and we could not care less if the peak means 10000 pixels or 90000 pixels. Don't know, don't care, unconcerned with the count, but a peak is a large area (many pixels) of that one color. The height is NOT related to the pixel height size of the image. The relative height shows the COUNT of the pixels with that tonal value (scaled so the peak reaches the top).
A peak in the middle somewhere means nothing, other than this scene had a large area of pixels of the same mid-tone color. That's just what this scene is, and it's hard to change the scene.

(OK, lighting could change it). If you don't like that middle peak, go find some other scene... this scene has it.
If you edit an image tonally, like the Levels white point, etc, as you move it and change tones, you will see the heights change drastically, jumping all around. It is just recomputing the new tonal values, and rescaling so that the new peaks reach the top. Tones you may not have even adjusted are jumping around that way. Height is relative, and means nothing in any absolute sense. The tallest peak will reach the top. Meaning, if there are no noticeable peaks, the entire data curve will be high, approaching the top. And relatively, a peak just means a large image area (lots of pixels) all of the same brightness represented horizontally there.
All that is really of much concern in a histogram is the possible clipping at the bright end, denoted by a peak right at 255, which is clipping, and means overexposure. We should back off on exposure so we don't have clipping, otherwise it is not recoverable. OK, it's generally good if the "average" data does approach the right end (generally and vaguely implying full and proper exposure of many "average" scenes), but NOT piling up there (and there are dark image exceptions that don't reach the right end). So actually, even approaching depends on the colors in the scene... but most average images are suitable for approaching... white clouds, bright skies, white shirt, white house or car, whites of eyes in portraits, etc. It is not just white, many colors can be bright, yellow, green, red, etc. Red flowers in sunlight (like roses) are real bad about clipping in the red channel.
But if that tall peak was at the right end at 255, now THAT would be a very serious major issue.

But the picture of the proverbial black cat in a coal mine surely should not reach near the right end (because it should be black). But lots of average scenes have some white or bright that reasonably should approach the right end. But should not actually get all the way there. This checking for clipping is really the only major practical importance of the histogram, and it is important, why we have histograms.
Contrast is another factor. High contrast means blacker blacks and whiter whites, more data range, data extending full range. So we do want to fill most of the full range (generally, but again, it depends). The black end normally has data in digital cameras, but it can be a problem in scanners, requiring correction at the black end.
Clipping needs more comments. There are two types of histograms, the set of three histograms with individual channels for red, green and blue. Also there is the single gray histogram intended for grayscale. Nikon cameras show both, probably most others do too. But the single gray histogram is is a math manipulation that does NOT show real RGB data values (called luminance, representing brightness as seen on a B&W screen). It shows different modified data that does not exist in our image file. Not showing real data, not showing true position, so it is WORSE THAN EXTREMELY POOR about showing clipping, it's a good bet that heavy clipping might not show at all as clipping.
Photo editors are different, they typically show one histogram, and Photoshop Levels is even gray (not luminance, but it does not differentiate to show color). But these are more sophisticated, and they do show the three RGB channels overlapped, real true data, in true position. No problem there, but do seriously avoid using the cameras single gray histogram. And the photo editor is too late to solve clipping. that's what the camera histogram is for.
See
There are Two Different types of Histograms for more explanation. But in the camera, always use the three RGB histograms. Otherwise you are fooling yourself, big time. Why the camera shows the mono histogram is a mystery to me.