A binary relation on a set $A$ is a collection of ordered pairs of elements of $A$.
An element of $A$ can be related to many elements of $A$.
A function is a relation between a set $A$ and a set $B$ with the property that each element of $A$ is related to exactly one element of $B$.
Having said that, all functions are relations but not all relations are functions.
A relation on a set $A$ is a function iff every element of $A$ is related or mapped to only one element. If you find that an element of $A$ is related to more than one element then the given relation cannot be a function.