Dependency Injection (DI) is a design pattern in which an object receives its dependencies from external sources rather than creating them itself. The main idea is to separate the creation of an object's dependencies from the object's own functionality. This promotes modularity, flexibility, testability, and loose coupling between different parts of a program.