A relay is a good way for a beginner to get introduced to controlling "real world" electrical loads such as lamps or solenoids.
Let's say you have an HCMOS logic chip or a PIC operating with a 5V supply. The output pin can be programmed to be logic low (0VDC) or logic high (5VDC). The pin itself can only source or sink a few mA. Here's one way to use that logic output and those 10 milliwatts of power (5V * 2mA) to drive a relay which can switch a 100 watt, 120 VAC lamp (view in fixed font or M$ Notepad):
Fuse VCC VCC .-. ____ Line
- + .-----( X )-----|_--_|----o
1N4002| | RY1 | '-'
- C| | 60 Watt 3AG 1A ^ C| o | C| - - '\ CRY1 | | \ 120 VAC | | o \ '---o | Logic Level | | Output | | ___ |/ '-------------------------o o-|___|-o-| 2N4401 Neutral
2.2K | |>
..-. | | | |
2.2K | | | '-' | | | === === GND GND created by Andy?s ASCII-Circuit v1.24.140803 Beta
This will get you there, and you can buy all the components from Radio Shack. Their 275-240 relay has a 5VDC coil, and will switch up to 1 amp at 120VAC.
If you're going to be using hazardous voltages like 120 VAC, make sure you have your teacher or someone who knows what they're doing check your work before you plug anything in. Safety first.
Good luck Chris