Press space key to throw the ball. Press H key to hit the ball. Your score will change if you hit the ball. When the score gets to 10 you win.
@Humph5678 helped me a bit.