While you will need your basketball to be inflated to play with, several reasons might account for wanting to take the air out of the ball. You should deflate your ball if you want to store it for the winter or fit it in a suitcase to travel, or you might want to just take out a small amount of air if the ball is over-inflated. For whatever reason, the same technique is used to allow air to escape from a basketball.
Insert the needle into the black valve on the basketball. You might need to lubricate the ball with some water, saliva or spray lubricant so the needle slides in smoothly. The needle should not be connected to a pump. Push the needle slowly into the ball, ensuring that you do not push the valve inside the basketball or puncture the inner bladder, both of which would make the ball unusable.
Squeeze the ball to push the air out of the ball. Some air should start to come out when you have the needle in the valve, but you can speed up the process my either hugging the ball in your arms or standing or kneeling on the ball. If you only want a little air to come out of the ball, simply squeeze the ball with your hands until the desired amount of air remains in the ball.
Pull the needle slowly out of the ball. When you remove the needle, the ball will stop deflating, but be careful not to pull the valve out of the ball as well.
Completely deflating a basketball can damage the outside panels on the ball. Deflate slowly so you can tell if the panels start to pull away from the ball.