Most of the time, when you need to keep a door shut, it is as simple as turning a deadbolt, twisting a lock or using a door chain. When a door needs to be held shut, but locking the door is not an option, there are numerous ways to jam a door if you have the right tools and materials.
Place the top of the chair directly under the doorknob. Push the chair toward the door until the back legs of the chair are snug against the floor. At this point, the chair should be supporting itself against the door. When the door is pushed to be opened, the chair will catch on the floor, preventing the door from opening.
Use a door-jam bar to secure the door. This item serves the same purpose as a chair, but is made specifically for jamming a door shut.
Place a door stop behind the closed door closest to the side with the doorknob. A door stop is made of plastic or rubber and is wedged into the space between the door and the floor. The door stop's main purpose is to keep a door open, but placing it behind the door can make opening the door very difficult. A door stop can be purchased at most departments stores and usually costs less than $5.
Close the door and use your hammer to pound the nails into the door frame at a diagonal angle along the edge of the door. Use nails that are at least 3 to 4 inches long, and make sure the nails are as close to the door as possible. Leave 1 to 2 inches of the nail exposed so the door will catch when someone attempts to open it. Use as many nails as you can along the frame, leaving at least 1 inch between the nails. This is a more permanent solution and requires more time than the other options.