The first thing to understand about boxing out is that it is the best way to create space for yourself so you can get the basketball. It isn't just to keep your man from getting it necessarily, but also a way to make it easier for you to get it. You must make contact first to square up the player you are boxing out.
The contact should be to stop him before turning and getting your rear into him. Stay low and get into his legs. If you are in his legs, he will be unable to really jump or move. By getting in the opposing player's legs you make it difficult for him to be in an athletic position.