Knock and announce rule

What is the “knock and announce” rule and what are its typical justifications?