People who just started to learn Spring framework is often confused by the term "Inversion of Control" (IoC) which can be achieved through "Dependency Injection" (DI).

DI is a way of providing the dependencies (e.g. creating objects and its dependencies), wiring components into application. In Spring, those objects defined and instantiated by Spring containers then inject into application are called Spring Beans.

IoC means to create instances of dependencies first. IoC is the end result of DI. However, DI is not the only way to achieve IoC.

​Some good explanations:

Inversion of Control (IoC) means to create instances of dependencies first and latter instance of a class (optionally injecting them through constructor), instead of creating an instance of the class first and then the class instance creating instances of dependencies. Thus, inversion of control inverts the flow of control of the program. Instead of the callee controlling the flow of control (while creating dependencies), the caller controls the flow of control of the program.

IoC is a programming technique, expressed here in terms of object-oriented programming, in which object coupling is bound at run time by an assembler object and is typically not known at compile time using static analysis.

Spring helps in the creation of loosely coupled applications because of Dependency Injection.

​In Spring, objects define their associations (dependencies) and do not worry about how they will get those dependencies. It is the responsibility of Spring to provide the required dependencies for creating objects.