What is the protocol the police follow to bring a dog on the scene of a traffic stop or another situation? Why are dogs called in? How are they trained and how do they respond?

Many local police departments have a canine unit with specially trained dogs and officers. How dogs are used in searches (home, car, land).

What is the protocol the police follow to bring a dog on the scene of a traffic stop or another situation? Why are dogs called in? How are they trained and how do they respond?