How do I connect my pedal to my guitar and amp?

The normal set up for a pedal guitar and amp are a guitar with a lead going into the pedal and then another lead going from the pedal into the amp, this way you can control the sound of what is going into the amp, generally I use a clean amp sound and the pedal gives all the sound.  There are also many more complicated pedal set ups including racks and one piece digital devices.