A function y=f(x) has the property that for any x in the domain there is exactly one value for y=f(x).
We can represent a function as a set of ordered pairs { (x₁,y₁), (x₂,y₂), ... }. Any set of ordered pairs where no value appears twice as the first element is a function. If the same x appears twice (with necessarily different ys because it's a set) that's not a function.
Function example: { (0,1), (1,3), (2,5), (3,7), (4,-13) }
Non-function example: { (0,1), (1,3), (2,5), (3,7), (3,-13) }
In the first set no x is duplicated so it represents a function; in the second 3 is the x in two of the pairs; not a function.