For blue, use up and down arrow keys. For red, use w to go up and s to go down. Don't let the ball hit the vertical edge of your side or the other team gets a point.
I got some programming from a game by placticine.