But how do you do this?
Close the Passing Lane
First, always try to deny your opponent the ball as aggressively as you can. By denying the passing lane to your opponent, they are often forced to receive a pass without getting squared up, and further from the hoop than they want to be. This allows you to defend more aggressively and not be put on the "defensive" (no pun intended!).
Once your opponent has the ball, try to immediately turn them in the direction they do not want to go. Ask your coach to help you understand this, but after you've played for a while you will start to get a feel for preferences your opponents will have. Also, never forget to notice ahead of time which hand your opponent prefers to dribble with. Unless you are trying to force them in that direction as part of your team defense, always force them to their weak side.
Getting Teammates Involved
By taking away the lane your opponent is trying to pass or dribble to, you can force them to turn one direction or the other--or even better, turn their back to you completely to prevent you from stripping them of the ball. By turning or forcing your opponent one direction or the other, and then turning them again and again, you take away their chance to square up. This will help all your teammates anticipate what options the opposing players will have to choose from.
Good basketball players are always involved in the effort to get squared up, or prevent their opponent from getting squared up.