This is a big question, but here are some of the basics:
The original 4.5V system worked with 3 x 1.5V C cells. It was produced between 1966 an 1986 and was used to power motors and lights in a wide variety of trains, technic, basic and even DUPLO sets.
Coexisting with this system, a 12V standard for LEGO Trains was introduced in 1969 and produced until 1993. The power was supplied by DC Transformer. There is no electrical compatibility between 12V and 4.5V components, and the higher voltage can damage the lower-rated parts. In addition to motors and lights, an assortment of other 12V accessories were available such as automatic switch points. The 12V system had two wires or three wires for track switches.
9V became the LEGO standard in the early 90s. There were a several different power sources, such as a single 9V battery, 6x 1.5V batteries and a DC Transformer (used exclusively for trains). The 9V system is electrically incompatible with either the 4.5V or 12V systems, but as I understand it, 9V components are electrically compatible with each other. 9V was a 2-wire system. Philo's web site provides electrical details of a variety of 9V motors.
For trains, the RC system was introduced in 2006, the previous 9V system being phased out the following year. The RC system was again a 2-wire 9V system.
Power Functions (PF) use a 4-wire system, the outer two wires providing power and the inner two control functions. Once again, it is nominally a 9V system, although it will cope with some variation to accommodate various types of batteries. For example, the 88000 AAA Battery Box uses 6 x AAA to supply up to about 9.6V and up to to 800mA current, depending on the batteries used, whereas the 8878 Rechargeable Battery Box delivers 7.4 V at up to 1.1A (?).
The first generation of Mindstorms, the RCX generation, was again based on 9V. The original 1.0 version could be powered using a 10V DC transformer, but later versions took 6xAA batteries. It used standard LEGO 2-wire 9V connectors. When powered, the sensor inputs can supply 9V. More details of the electrical characteristics of these ports can be found in Claude Baumann's Making Your Own RCX Sensors.
The Mindstorms NXT system is a 6-wire ~4.5V system.
Right, that's a start. Please edit this answer to add additional information.