I loved this fascinating post by Windell of Evil Mad Scientist Laboratories, all about managing power in electronics projects:

An ever-present challenge in electronic circuit design is selecting suitable components that not only perform their intended task but also will survive under foreseeable operating conditions. A big part of that process is making sure that your components will stay within their safe operating limits in terms of current, voltage, and power. Of those three, the “power” portion is often the most difficult (for both newcomers and experts) because the safe operating area can depend so strongly on the particulars of the situation.

In what follows, we’ll introduce some of the basic concepts of power dissipation in electronic components, with an eye towards understanding how to select components for simple circuits with power limitations in mind.

Windell goes into the math in choosing the right components to ensure that, for example, your resistor can take all the current going through it.