Understanding extension by definition Definition of relation symbols
According to this wikipedia page https://en.wikipedia.org/wiki/Extension_by_definitions, an extension by definition is the following. Let $T$ be a first order theory and $\varphi(x_1,...,x_n)$ be a formula of $T$. We form a new first order theory $T'$ by adding a new $n$-ary relation symbol $R$ the logical axioms featuring $R$ and the axiom $$\forall x_1...\forall x_n( R(x_1,...x_n) \iff \varphi(x_1,...,x_n)).$$
Definition of function symbols
Let $T$ be a first order theory and $\phi(x_1,...,x_n)$ a formula of $T$ such that $y,x_1,...,x_n$ are distinct and include the variables free in $\phi(x_1,...,x_n)$. Assume that we can prove $$\forall x_1...\forall x_n \exists!y(\phi(y,x_1,...,x_n)$$ in $T$. Then we can form a new theory $T'$ from $T$ by adding a new $n$-ary function symbol $f$, the logical axioms of $f$ as well as the axiom $$\forall x_1...\forall x_n (\phi(f(x_1,...,x_n),x_1,...,x_n)).$$
As far as I understand it, the we have the following examples:
$(1)$ Consider two sets $X,Y$ as well as a function $f:X \to Y$. Then we know that for all $x \in X$ there exists exactly one $y \in Y$ such that $(x,y) \in f$. Hence we can introduce a new symbol $f(x)$ denoting this object $y$.
$(2)$ Consider two sets $A,B$. Then there exists exactly one set $X$ that satisfies $\forall x(x \in X \iff x \in A \wedge x \in B)$. We introduce a new symbol $A \cap B$ to denote this set.
Questions
$(i)$ Is the following also an example of definitional extension? Consider a function $F:X \times X \to X$  such that $X$ is a set whose elements are functions from $Y \to Z$, where $Y$ and $Z$ are sets such that the following is satisfied: For all $y \in Y$ and all $f,g \in X$ satisfying $f(y)=g(y)=z$ we have that $F(f,h)(y)=F(g,h)(y)$ and we thus define this object to be $F_z(h).$
$(ii)$ What exactly is the difference between relation and function symbols? What is an example for a "new" relation symbol?
$(iii)$ What does "the logical axioms of $f$" mean, as it is mentioned in the definition of function symbols?
$(iv)$ Why do the $y,x_1,...,x_n$ need to be distinct? What is even meant by distinct? Does this mean that they refer to distinct objects and if so, what would go wrong if they refer to the same object?
 A: Your examples are fine: in set theory we have only one "basic" binary predicate symbol: $\in$, and we introduce new symbols, like $\cap, \cup$, defining them in terms of $\in$.
A formal definition will be:

$C = A \cap B \leftrightarrow \forall x(x \in C \leftrightarrow (x \in A \land x \in B))$.

It will be a good definition provided that we prove that set $C$ exists and is unique.
To (ii) "What exactly is the difference between relation and function symbols? What is an example for a "new" relation symbol?"
A relation symbol expresses a relation between objects: $(x≤y)$ in arithmetic and "x is taller than y" in common world, while a function symbol "names" an object $(x+y), A \cap B$ and "the father of x".
Similarly to $\cap$, in the language of arithmetic usually there is no $\le$ symbol; we define it with: $(x≤y) ↔ ∃z(y=x+z)$.
To (iii), when we want to add a new symbol $f$ to a theory $T$, we "enlarge" the language of $T$ with the new symbol and we add the formula defining it as a new axiom. The resulting theory is $T′$.
About (iv), the basic fact is that if we want to add a new function symbol meaning $y=f(x)$ we have to find a suitable formula $\varphi(x,y)$ with $x$ and $y$ free that satisfies the "functionality condition": for every $x$ there is exactly one value of $y$ such that $\varphi(x,y)$ holds.
