There are two types of brake light switches, normally opened and normally closed. Brake levers and brake light switches are situated in such a fashion that the brake light switch is pressed in when the brake lever is at rest, and is released when the brake lever is pulled.
Normally Closed (or NC) are the most common type of moped brake light switches. NC switches operate as a closed circuit when the button is at rest, meaning the two wires attached on either side of the switch are connected when the brake lever is pulled. When the lever is not pulled, this connection is broken as the button is being pushed in.
Wiring NC switches involves simply running one wire from the stator to one side of the switch and the wire from the brake light to the other side of the switch (ensuring the brake light has a proper ground, of course)
Normally Open (or NO) switches means that when the switch is at rest (lever pulled) there is an open circuit between the terminals. When the lever is not pulled, the switch connects the two wires.
Wiring NO switches involves running a wire from the stator directly to the brake light bulb with a junction in the wire leading to the brake light switch. The other end of the brake light switch must be grounded, so that when the lever is at rest (and the button depressed) the brake light circuit is grounded out. In many NO switch systems the ignition coil grounds through this circuit, so failure to hook up the brake light circuit (or just ground the wire coming off the stator for the brake light circuit) will result in no spark.