What is the difference between function and a relation?

what is the difference between function and relation?