How does macOS know when to Automatically Adjust Brightness? I understand the "Automatically Adjust Brightness" feature, when enabled, is designed automatically to raise or lower the brightness of e.g. the Macbook's screen depending on whether the surrounding environment is dark or well-lit.

I am curious what sensor onboard the Macbook laptop is used to detect the amount of light in the room. 

A cursory experiment caused my Macbook's screen to dim when I covered the webcam, even though the webcan was not on, and the green light wasn't lit. Is the Macbook's webcam constantly sensing light levels? I was under the impression that the webcam was wired to prevent the webcam from capturing without illuminating the green LED. 

If there is some other sensor positioned close to the webcam just for sensing light levels, what is it?
There is an ambient light sensor near the webcam (not part of the webcam) that is used for this. If you shine a flashlight on your camera, you'll see it about 75mm right of the camera.