ZFC doesn't define anything; it's just a theory of sets. In particular, every object in a model of the theory of sets is (by definition) a set.
The idea is: there is a notion of 'function' inherent to mathematics: a function $f$ is an entity which associates two sets, say $X$ and $Y$, by assigning to each element $x \in X$ an element $f(x) \in Y$. Simple as that.
The problem is that 'entity' isn't good enough, we need it to be a set. How do we formalise this notion? Well associated with every function $f : X \to Y$ is its graph. In the case of $f : \mathbb{R} \to \mathbb{R}$ this really is its graph: you draw a pair of axes, which give you the plane $\mathbb{R}^2$, and then the graph of $f$ is a certain subset of $\mathbb{R}^2$. Every function has a graph, and given the graph of a function we can recover the function from the graph, so identifying a function with its graph seems like a sensible thing to do.
So, when we formalise the notion of a 'function' in the language of set theory, we can define it to be a subset $f \subseteq X \times Y$ satisfying precisely the conditions needed for this subset to be the graph of a function. We can then think of $\langle x,y \rangle \in f$ as meaning $y=f(x)$, because the graph is precisely the set of pairs $\langle x, f(x) \rangle$ for $x \in X$.
What this means is that: $f$ is a function $X \to Y$ if and only if $f \subseteq X \times Y$ such that, for each $x \in X$, there is a unique $y \in Y$ such that $\langle x,y \rangle \in f$.
This is probably the most common formalisation of a function in ZFC. But theoretically, any formalisation that allows you to (reversibly) encode the essence of being a function (i.e. assigning to each element of the domain an element of the codomain) would be just as good a formlisation as this one.
Another possible definition would use the cograph, which a partition of $X \sqcup Y$ (the disjoint union of $X$ and $Y$), all of whose components contain exactly one element of $Y$. Then $f(x)=y$ if and only if $x$ and $y$ lie in the same subset of the partition. (This is dual in a very precise sense to the graph.)