See "Inversion of Control Containers and the Dependency Injection pattern" for a thorough description.