Dependency injection (DI) is a way of developing software such that various components are related in a very loosely coupled way. In most software applications, there is always some form of dependency between the various bits and pieces.
Take a restaurant application for instance. You might have a component that handles taking orders, another for sending a message to the kitchen, yet another for checking available ingredients for a given meal, and one or two for calculating the total bill.
These are all various components that need to depend on each other to fulfill the duty ...