Most electrical outlets require two conductors, not including the ground wire, which isn't really part of the circuit. One of the conducting wires -- the neutral -- is white; that color is mandated by the National Electrical Code. By convention, the other is usually black, but it could be red. Usually, though, you see a red wire only when the outlet is a 240-volt one or when it's controlled by a switch.
Standard Outlet Wire Colors
Wiring practices in the United States are stipulated in the NEC, the National Electrical Code, and electricians in Canada and Mexico also tend to follow the same codes. Because the NEC specifies the colors only for ground and neutral wires, electricians are free to wire the hot leg in a circuit with wires of any other color. By convention, however, the hot wire in a cable with two conductors plus ground is black, and the extra hot wire in a three-conductor set is red. Since you only need two conductors to wire a 120-volt outlet, you seldom see a red wire in the outlet box, although there is no regulation that prevents an electrician from subbing a red wire for a black one.
If the outlet you're servicing is the one you use for your range, water heater or dryer, it's a 240-volt outlet. It doesn't have the same prong configuration as a 120-volt one, and it always has a red wire. When measured with respect to the white neutral wire, the red wire carries the same 120-volt current that the black one carries, making the voltage across these two hot wires 240 volts. One of the hot wires attaches to a brass terminal on one side of the outlet, and the other attaches to a brass terminal on the other side.
If you see a red wire spliced together with a black one in a 120-volt outlet, it's probably because the outlet is powered by a wall switch. Certain switch loop configurations require a three-conductor wire -- the extra wire is needed to complete the circuit at the switch. The two outlets in a duplex receptacle are bonded so that both can be powered by a single wire, but it's possible to break the bond and control just one of the receptacles with a switch. In this case, you'll see a red wire connected to one of the receptacle terminals.
A Loose Red Wire
You may uncover an outlet only to find an extra red or black wire hanging there doing nothing. It may be left over from a previous switch loop or it may be there simply because an electrician mistakenly used three-conductor wire to connect the outlet. It's a bad idea to leave a bare wire in the box, so even if testing with a non-contact voltage tester reveals that the wire is dead, you should insulate the end by screwing on a wire cap. If the wire isn't dead, it's probably time to call an electrician to help you decipher your house wiring.