Magna International interview question

What is the difference between function and store procedure in SQL?