Doximity interview question

What is generator and yield in python. Difference between class and function in python.