This is a recreation of the old game pong. to control your player (which is on the left) move your mouse and it will follow it. try to bounce the ball around vs AI and if it hits the side you lose.
If you want to know how anything work then copy the project and also the AI isn't really AI it's just the other sprite going to the ball's Y position.