Move the ball around, then press space to drop it. You can not pick it up when it's in the air.
I did this as a school project, not for fun. I only shared it because later I will turn it into a game.