I'm a total noob and I believe this question treats about very common practice, but I can't find satisfying info

Could you tell me pls some general rules about connecting external current sources to circuits controlled by raspberry GPIO and NOT burn RPI?

Assuming I would like to experiment with this circuit: http://arduino.cc/en/tutorial/ShiftOut (using RPI ofc) and connect much more LEDs... RPI could not support so much current, so there's some external power needed.
Pls give some advices

greetings