Exposure compensation is a very useful tool to adjust the exposure in-camera. But before we take the plunge to understand how exposure compensation works we need to understand why it is necessary to do so in the first place.
The digital camera sensor
You see, the need to use exposure compensation comes straight from the way the digital camera sensor is designed. The digital sensor is at the heart of the camera, capturing light and converting the signals into a photograph. It is designed in a way so that it tries to makes everything 18% grey.
Now you would ask why that is so. The reason is 18% grey is right in the middle of the luminosity chart, the extreme two ends of it being absolute black and absolute white. The sensor is designed so that it takes into consideration everything in the frame, reads the reflected light and makes an ‘average’ exposure to retain details in both the highlights and the shadows.
This however is not what photographers normally want. Because a scene may have a lot of black in it and the camera, reading it to be too dark, could try to incorrectly bump up the exposure to make it grey. The reverse happens when it is too bright. The camera reads the scene and tries to underexpose because it feels the scene is too bright. These are but two of the conditions where it becomes necessary to know how exposure compensation works manually.
The exposure compensation button
When you fiddle with the exposure compensation button the camera will either increase or decrease the exposure depending on which way you are dialling. The exposure compensation button is set differently by different manufacturers. Please, instead of struggling to find how exposure compensation works, refer to your manual to check where this button is on your camera.
Nikon cameras have a [+/-] sign that indicates it is the exposure compensation button. Canon cameras also have a dedicated button but then you will need to press it and then turn the rear or front ring in order to adjust the exposure.
If your camera is set to aperture priority mode, turning the exposure compensation to right will reduce the shutter speed, leading to an overexposed photo compared to what the camera reads the scene. Alternatively if you turn the ring to the left it will lead to an increased shutter speed leading to an under exposed photo than what the camera thinks is right. When your camera is set to shutter priority mode turning the ring right opens up the aperture and vice-versa.
If you are confident of using the manual mode then I suggest you to not use the exposure compensation option in that mode. In manual mode you can very well set the exposure yourself so there is no need for you to fiddle with exposure compensation.