A layer mask is used to hide portions of a layer and reveal portions of whatever layer is below it. You can modify the mask by using the brush tool and painting in either black or white.
Levels is used to correct the tonal range and the color balance of an image. It does this by adjusting the intensity of the shadows, midtones, and highlights of your image.
levels of the image in the LAB color space to achieve the effect.