The Dependency Inversion Principle is a software design principle that states that high-level modules should not depend on low-level modules, but rather both should depend on abstractions.
Dependency injection is a technique that allows a programmer to follow the Dependency Inversion Principle by injecting the dependency (i.e., the low-level module) into the dependent object (i.e., the high-level module) at runtime, rather than having the dependent object create the dependency itself.