If you want to understand what “shadows”, “midtones” and “highlights” are and what they do, then, at first you should take a look at the image below without thinking about numbers (at least for now :}).

The darkest colours in this image—like the upper portion of the background or the shadow under the car—are “shadows”. The brightest—e.g. light reflexes on chromed parts—are “highlights”. All the rest is “midtones”—tones between “shadows” and “highlights”. So far, so good :}.
Terms like “shadows”, “midtones” and “highlights” are convenient because they are intuitively understandable. For the same reason, we use colour models like HSL or Lab. “Shadows”, “midtones” and “highlights” then, can be used to quickly identify the portions of image a designer wants to adjust. “Shadows”? Adjust only the darkest regions. “Highlights”? Only the brightest. In that regard “shadows”, “midtones” and “highlights” may be used by any tool, not only “Color Balance”, as means to “point” the colour ranges which are to be acted upon.
“Shadows”, “midtones” and “highlights” can be understood, from the implementer's perspective, as a simple colour ranges (“operation we're about to do will affect only pixels in the given range and no other”). The exact description of these ranges depends on the used colour model. For example, in HSL, we could say that “shadows” are all pixels which have L less than 30%. In RGB, we can use other criteria. Generally, these criteria have to be confirmed experimentally (what feels “intuitive” for the designer). They are formulated in a bit of a heuristic manner, hence the inconsistency of “definitions” you've found.
Once the colour ranges are defined for your case, you may proceed with your image operation. “Selected” pixels will be handed over to your procedure. Any procedure.