Microsoft interview question

Explain how Oauth works?