This page explains you the difference between:
Basically, you need to look at the inversion of control principle:
1)