Most electrical boxes house a switch or receptacle.
The junction box, or J-box , is closed to the world. Commonly used to extend a circuit or split one power source into two or more circuits, it provides a safe, contained place for making wire connections. You'll need a metal J-box in an electrical system where the wiring runs through metal conduit, because the box is part of the ground. Metal or plastic typically is OK for nonmetallic cable such as Romex, but check with your building department to be sure. Most important, remember that a J-box must always be totally accessible for service.