Levels adjustment is used to adjust tonality and color balance of an image in shadows, mid tones, and highlights intensity levels. Level is mostly used to adjust contrast and color correction in an image. This is one of the most widely used tool in photography.
The histogram slider in the application can be used to map image's input levels to output levels. Initially sliders are set to level 0 in case of black pixels and level 255 in case of white pixels.
The black histogram slider can be moved to map image's pixel value to level 0 or white histogram slider can be moved to map image's pixel to level 255. The remaining levels of the image gets redistributed between level 0 and level 255. This redistribution of levels lead to increased tonal range of an image and thus lead to increased overall contrast of the image.