What is the rule regarding police use of force?

What is the rule regarding police use of force? Under what circumstances may law enforcement officers use deadly force? Is excessive force ever justified?