Adjusting Photograph Levels
Fairly good article:
https://digital-photography-school.com/take-control-contrast-using-curves-levels-photoshop/
The idea behind levels is that you arbitrarily make a function that maps input pixels to output pixels, by adding points on a curve that you can move around.
Steeper curve means more contrast. Moving the curve lower means values are mapped to darker values, higher means lighter.