Amazon interview question

What is the difference between MySQL and NoSQL, when might one be preferred over the other?