Power
First, some basic electricity:
We all know what electrons are, right? They're the negatively charged particles in atoms. Picture the electrons as microscopic balls.
Voltage is the electric force that pushes the electrons through wires. Voltage, sometimes called electromotive force, is measured in Volts.
Current is the flow of electrons: a quantity of electrons flowing past a point in the circuit, per unit time. Current is measured in Amperes. You can think of it as electrons per second.
Resistance is anything that impedes the flow of electrons. If the microscopic balls are flowing through a tube, then a smaller-diameter tube would be greater resistance. If the tube is tilted so that the balls have to flow uphill, that would be greater resistance too.
Voltage = current x resistance. V = I x R. That is Ohm's Law. - If you have a bigger force pushing your electrons, more electrons will flow (if V increases and R is kept the same, I increases). - If you keep the electric force constant, but use a bigger-diameter tube, more electrons will flow (V stays the same, R decreases, so I increases).
Power is the rate of energy flow: the amount of energy per unit time. Power is measured in Watts, or Joules per second. Power is also equal to voltage x current, or voltage x voltage / resistance, or current x current x resistance.
Power is important to understanding flashlights, because if you have more power, you usually have more lumens (light output). For example, one specification of an LED is its lumens per Watt (lm/W) rating, or luminous efficacy. The higher the lm/W, the better. Either you get more lumens (light output) per unit of power, or you get the same light output and consume less power.
Here's an example that shows how understanding power helps to understand how a flashlight works:
Say your light uses one Cree XM-L LED, and runs off one lithium-ion 18650-sized cell. The cell is rated at 3.7 V, 2900 mAh. "mAh" = milli-Ampere-hour = 1/1000 Ampere for one hour. That is, this battery should provide close to 2.9 A for close to an hour. The battery voltage drops continuously as it depletes, but let's take 3.7 V as a fixed and approximate value. The battery can supply power equal to 3.7 V x 2.9 A, for close to an hour. This is the cell's Watt-hour rating: 3.7 x 2.9 = 10.7 Wh.
Now let's look at how the LED consumes the power. The LED has a "forward voltage" (Vf) of about 3.5 V. That is, as long as there is enough current through the LED to turn it on, the voltage across the LED is about 3.5 V. Therefore, at any given LED drive current, we know its approximate power consumption. If we drive the XM-L at 2 A, the LED is consuming 2 x 3.5 = 7 W. If we estimate the driver efficiency to be about 80%, that means we have to supply 7 / 0.8 = 8.75 W of power from the battery. An 18650 should be able to drive this light at 2 A for a little over an hour.
You can think of this in reverse too. If you have a flashlight and you don't know how much output it's producing, you can often measure the tailcap current (battery current) and estimate the light output. For example, with the light above, say you measure the tailcap current to be 4.0 A. You then calculate the power supplied by the cell: 4 x 3.7 = 14.8 W. In reality it would probably be closer to 12 W because of the battery voltage dropping under high loads, so let's use 12 W as our estimate of battery power.
Again approximating the driver efficiency to be about 80%, we'd be left with 12 x 0.8 = about 9.6 W to the LED. Dividing by the LED Vf, we get 9.6 / 3.5 = 2.7 A. In this case, we are driving the XM-L LED at quite a high current; close to its rated maximum. The light will be producing somewhere in the neighbourhood of 900 lm. See Cree's data sheet for the XM-L LED for details.