IOC stands for "Inversion of Control". It will works based on IOC principle,it means collaborating the objects and managing the objects of life cycle.Collaborating means the objects are group together at one place. we can collaborating the objects are two ways which they are Dependency Pull and Dependency Injection . DP divided into two ways (Dependency pull and Contextual Dependency pull) and DI also divided into two ways (Setter Injection and Constructor Injection).IOC supports both the ways but,the main intention of spring frame work is our components will be come completely loosely coupled.
If we will use Dependency pull our component class will become tightly coupled with another class even though as part of spring frame work.then the recommended to go for Dependency Injection (Setter Injection or Constructor Injection). There is no difference between the IOC and DI.IOC is different and DI is different, DI is one of the part of IOC.