Professionals usually recommend installing a junction box by bringing a new wire from the main electrical panel to the box rather than tapping off an existing electrical box. This is done to avoid circuit overload, which is important to protect against because of the threat of a potential electrical fire.
If you are working on adding an additional circuit to an older home, running new ROMEX wire from the electrical panel is often your best option because you do not want to plug your expensive big screen TV or computer with all of your important data into an older two-wire receptacle.
It's recommended to install new ROMEX circuits to safely accommodate modern-day technology in an older home. You can buy junction boxes at any hardware or big-box home improvement store. A junction box will cost less than a dinner for two at McDonald's and increase the safety of your home's electrical system. While you are there, pick up a couple of extra covers for any uncovered junction boxes you might later discover during an attic inspection or in the garage.
Electricians typically secure a junction box to a strong structural location such as a stud or joist, and it's absolutely necessary if the box will be used to support a light fixture. Other types of junction boxes have wings that fit inside a cut-out drywall hole, but these ones aren't sturdy or stable enough to support a light fixture.
People sometimes call a receptacle box a junction box and use the words interchangeably, but may use receptacle box as a more generic term, and it isn't always a junction box.