What is the difference between a psychologist and a psychiatrist?

What is the difference between a psychologist and a psychiatrist?