Before doing any work, always turn off the power prior to working on a junction box. Some experienced, professional electricians may not always turn off the power, figuring if they never cross a hot wire, they will live to see another day, and most of them do, except for that one guy. Don't be that one guy. Turn off the power first.
Also, resist the urge to guess at which breaker switch controls the room you are working in, and just hit the main breaker so that there will be no question that all of the power is turned off. It's a small inconvenience to have to reset digital clocks to avoid a potentially fatal outcome.
Punch a hole out to provide a path for the wires to enter the box. Use a cable clamp to secure the ROMEX wiring that comes into the box, and cap wires inside the box with wire nuts. If you have difficulty twisting the wires together, use needle-nose pliers to twist black to black and white to white, before attaching the wire nut, then ground the box.