Actually, a more complex AI would predict the ball's path using trigonometry and position itself in the spot where it would reach the paddle. For example, the ball would bounce off the top side wall and travel to the bottom right - the CPU would know to move to the bottom rather than blindly follow the ball and move up. However, what Shadow Hog suggested is much simpler, and is adequate for most situations. It's also good practice for learning game logic. Once you're familiar with game logic, you'll be able to tackle just about any game development tool or programming language. Provided, of course, that you will learn their syntax, but the basic principles will remain the same.