Hi Sangel Kapoor,
Spring framework consist of many features. Based on your question, to understand what DI or IOC, please look into this code segment.
See the Human class and it contains a reference to Heart class as a private property.
If you want to set a heart object to Human , Then you have to write following code.
But what DI or dependency injection does is setting the heart object to human during run-time.
So you do not need to write code to set the heart object.
If you use spring DI feature you do not need to write above code Segment-3.
That will be done by spring dependency injection.
(Heart is a dependent of Human, So spring has injected the dependent,Heart into Human. That's that we call Dependancy injection)
Any how even without people can develop java applications.
But spring provide some easy ways of doing things, provide some features(eg: DI, IOC), provide a platform for application development and enforce best practices ect.
To learn more about Spring you can find many articles on the internet. Below is an introduction.
http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html