This switch is the black plastic piece with the white wire plug attached. It is what's known as a "Normally Closed" or "NC" switch. That means that when pressure is released, current can flow through the switch.
When the brake lever is at its rest position, it is depressing the plunger on the switch. This holds the circuit open, preventing current from flowing. When the lever is pulled to apply the brakes, it moves the end away from the switch, allowing the switch to return to its normal state and complete the circuit.
The sensitivity of the switch can be adjusted by screwing or unscrewing the switch. As it is unscrewed, it becomes more sensitive and will come on with less pressure on the brake levers.
Once you have determined where you would like the switch, you should fix it in position. Suggestions for how to do that include sticking a very small washer inside the housing into which you screw the switch, putting Teflon tape on the switch threads, or using electrical tape to hold the switch in position.
It is also advised that you put dielectric grease on the contacts of the switch to prevent corrosion and switch failure.