A junction box is a container used to enclose electrical connections (junctions). Use with the [electrical] tag. Use with [wiring] if your questions involves wires.
When you need to connect two wires together, that is called a junction. By code, all junctions must be made within a junction box. This protects the junction and contains any electrical arcing.
The most common use for a junction box is to install a switch or receptacle.
Reference:
http://en.wikipedia.org/wiki/Junction_box
Related Tags: