What is PHP D.I when and how to use it

Can I ask when we use D.I is this can be done always in constructor ?