A function is a specific type of relation. Both a function and a relation have input and output. A function is limited to only one output for each input, though. A relation has no limit on how many outputs each input can have.
Good question. A relation is simply that; any x-value to create any y-value. A function, however, cannot be defined for multiple values of x. In other words, for a relation to be a function, it must have singular values for all x within its domain.
A function is a special type of relation. So first let's see what a relation is. A relation is a diagram, equation, or list that defines a specific relationship between groups of elements. Now a function is a relation whose every input corresponds with a single output.