Dependency Injection is a design pattern used to implement Inversion of Control, allowing a class to receive its dependencies from an external source rather than creating them internally. This promotes loose coupling and enhances testability.
For example, in a PHP application, instead of a class instantiating its dependencies, we pass them through the constructor. This makes it easier to swap out implementations for testing or future changes.