How is a relation defined? I've read multiple ways of defining relations and was wondering what is generally accepted. One of these ways is as follows.
$xRy=C\iff C\subseteq A\times B$
and the cartesian product is defined as
$A\times B=D\iff (\forall x)(\forall y)((x,y)\in D\iff x\in A \land y\in B)$
Is this definition generally accepted or is there a more formal definition?

In set theory, relations are sets; thus "to be a relation" is a property of sets.
We define the pair $(x,y)$, for example with Kuratowski's definition, and then we define the cartesian product of two sets $A$ and $B$ : 

$A \times B = \{ (x,y) \mid x \in A \text { and } y \in B \}$.

Finally, we define when a set is a (binary) relation :

$\text {Rel}(A) \text { iff } \forall x \ [x \in A \to \exists y \exists z (x=(y,z))]$.

The symbol $xRy$ is an abbreviation for $(x,y) \in R$.

Due to the fact that $A \times B$ is the set of all pairs $(x,y)$ with $x \in A$ and $y \in B$, we have that :

for every $C$, if $C \subseteq A \times B$, then $\text {Rel}(C)$.

