Why does a dog scratch himself?

Why does a dog scratch himself?