The ball, or Slip indicator is used to tell whether or not you are in 'coordinated flight'
Coordinated flight means that the airplane is flying straight ahead to the relative wind over the airplane, thus is it's most efficient.
If you are slipping or skidding, to one side or another, there is more airplane blocking the airflow over the airplane and it is no longer as efficient as it can be.
Think of it like this:
You're driving through the arizona desert on one of those long straight roads, the car is straight ahead relative to the wind passing over it and is thus efficient. The ball would be centered like so :
( \O/ )
You next hit an oil slick (like from Atari's pole position!) and the car starts skidding and now its still going straight down the road but it is sliding to the right. Now the car is not aerodynamically efficient because even though its going straight down the road, there is a lot of the car causing air resistance. If the front of the car is pointed to the right, the ball will look like this:
( \ /O)
This is important with airplanes because the airplane just likes flying more when it's coordinated. Try taking a look at it next time you're in the plane and kick the rudders right/left and watch how it affects the ball.