As an opponent is receiving a pass or ending a dribble, you can move in close to try to stop the shot, from stepping around (after ending a dribble or receiving a pass) or from driving (after receiving a pass). If you are the same height, or taller and more athletic than your opponent, you may be able to stop them from executing any play options, including a penetrating pass.
When guarding a player some distance away from the basket, jamming is an option. However, near the basket, that is, in the paint, being able to jam effectively is an essential defensive skill.
The Basic Stance
Stand so that your feet are shoulder-width apart and parallel to each other. Flex both knees to lower your center of gravity. Your torso should be erect. Look straight ahead. Make sure you are relaxed, with no tenseness in the wrist, elbow, shoulder, hip, knee, and ankle joints.
Raise both arms directly in front of you, so that the forearms are vertical and your elbows are directly in front of and slightly higher than your shoulders. Your hands are facing away from you. By moving your upper arms, you can raise or lower your forearms, bringing the hands as low as the shoulders or as high as the forearms can reach.
Jamming Your Opponent
As your opponent is ending their dribble or receiving a pass, move in as close as possible, assuming the basic stance. Stay directly between your opponent and the basket and maintain the basic stance. Staying directly between your opponent and the basket involves keeping your hips in line with the hips of your opponent. Laterally popping enables you to keep your and your opponent's hips in line as your opponent tries to step or drive by you.
Jamming in the Paint
Because not letting your opponent shoot is your prime concern, keep your hands as high as possible. To avoid fouling, make sure you keep your forearms vertical.
Jamming on the Perimeter
Try not to let your opponent execute a penetrating pass toward the basket. When the player moves the ball to one side or the other of his/her body, use the hand nearest the ball to shadow it. Be ready to knock it loose or to deflect a pass.
When the ball is directly overhead, both hands should be in the passing and shooting lanes. One hand should always be protecting these lanes.