What is the dependency inversion principle and why is it important?
Good answers and good examples are already given by others here.
The reason DIP is important is because it ensures the OO-principle "loosely coupled design".
The objects in your software should NOT get into a hierarchy where some objects are the top-level ones, dependent on low-level objects. Changes in low-level objects will then ripple-through to your top-level objects which makes the software very fragile for change.
You want your 'top-level' objects to be very stable and not fragile for change, therefore you need to invert the dependencies.