Practice maintaining a distance of from 3 yards to as little as one foot from the defense. Always force the offense to one side or the other whether or not they have the ball. You need to be aware of which way, right or left, the offense likes or wants to move, and then prevent them from doing it. Forcing involves setting up at about a 45 degree angle to the defense, one foot to the side. This positioning makes it easier for the defense to go around you one way and more difficult to go the other way.
Defense is most important around the basket.
This is priority number one. Prevent low post players from moving where they want to go. Cover a player jumping or cutting into the lane. Boxing out is just not a defensive skill. Use it on offense as well.