In order to turn the brake lights on when the pedal is pressed, a switch must be mounted behind the pedal lever. The circuit that controls these lights is normally off, but is turned on with a slight input from the brake pedal when installed correctly. This switch also often has a contact that is normally on, but is turned off when the pedal is pressed, and this signal is passed on to either the PCM or through the neutral safety switch.
How to Test a Brake Light Switch
Testing a brake light switch is fairly straightforward; you just need to confirm that voltage is making it through the switch at the appropriate times. Both the neutral safety switch and light circuits go through on/off phases, typically opposite each other. You can usually tell right away which contacts are on the same circuit, because they are often two different sizes, so larger goes with larger, and smaller with smaller.