In short, you're pushing the ball around, and the force you use depends on three things:
- how far the ball is from the target (P, proportional)
- how far the ball has been from the target over time (I, integrator), so if you are very far even after a long time you try to push harder
- how quickly is the ball approaching the target (D, derivator), i.e. if you're approaching quickly then you decrease the force, if you're approaching too slow then you increase the force
The article links the Wikipedia page: https://en.wikipedia.org/wiki/PID_controller
If the goal is to teach about PID controllers, then the demo could use a graph showing the parameters through time.
A real life example is the stabilisation of quadcopters ("drones" eugh I hate that word). Where instead of attempting to reach a location the target is to maintain a specific angle relative to the ground.
As always wikipedia is your friend http://en.wikipedia.org/wiki/PID_controller.