Intuitively a function is a way of mapping a set of values (the domain) to a (possibly another) set of values (the codomain) so that each element in the domain is mapped exactly once.
The issue is how do we define this concept of "a way of mapping" that's.... not a well defined mathematical thing.
Mathematicians decide well if each item in the domain is "mapped" to another the what we actually have on our hands are a bunch of pairs if $x_{input}$ somehow "mapped" or glued to a $y_{output}$. As they are pairs we can just describe them as a set of ordered pairs where each pair is an $(x_{input},y_{output})$ ordered pair.
If it helps you do visualize it if our function is the rule $x \mapsto x^2$ or $f(x) = x^2$ we can write the function as the set of all pairs $(x,x^2)$ or $(x,f(x))$.
Thus the definition of sets is really the most concrete one. This is actually exactly the same as relationship one because the same problems we have describing what a function is, we have defining what a "relationship" is. Mathematicians who define "functions" as sets of ordered pairs will also define "relationship" as a set of ordered pairs. That is if we say $a$ relates to $b$ in some way we mean they are glued together as an ordered pair $(a,b)$ and are in the set of all pairs of relatives.
(The only difference between a function and a relation is that functions must have exactly one ordered pair for each input value. A relation may have many for a value or may have none for a value.)
The first definition? Well, that's trying to explain the writing of a function as rule between variables. That is $y = f(x) = someway\ of\ connecting\ values\ of\ x\ to\ values\ of\ y$. But it is still consistent as our rule leaves us with a set of $(x, y=f(x))$ pairs on our hands.
So all three of those are basically the same thing.