They do not seem incompatible to me since they talk about different types of 'totality'. The first definition takes 2 sets $X, Y$. While the second definition uses only one set. (It's a binary relation over one set, wikipedia speaks of endorelation)
You could transform the first definition so that it uses one set:
A relation $R \subset X\times X$ is total if it associates to every $a \in X$ at least one $b \in X$; that is
$$\forall a \in X, \exists b \in X: (a,b) \in R$$
However, this is weaker than the second definition. Wikipedia would speak of left-total.
Roughly said:
The first definition demands that from every element in the source at least one relation departs.
While the second definition demands that every element in a set has a connection with every other element in either one, or another direction (or both)
Compare following examples:
In the first picture the relation is left-total from $X$ to $X$. (Every element has at least one arrow departing - C has even two arrows departing). While the (endo)relation is not total as in definition 2. In the second picture it is total as in in definition 2. It also seems to be left-total.
(When a relation is total as in definition 2, it does not have to be left-total. Can you find an example?)
You have many questions, I'll try to adress them all.
A binary relation, as you read is just some set $R$ which is a subset of the cartesian product of two sets $A$ and $B$, that is $R \subseteq
A\times B$.
An example may ilustrate this:
Let $A=\{\dots,-4,-2,0,2,4,\dots \}$ (the set of even numbers), $B=\{1,3,5\}$.
Then a relation $R_1$ could be $R_1=\{(-4,1),(-4,3)(0,5)\}$
We usually denote a pair $(a,b)$ of a relation with the notation $aRb$ meaning a is related with b.
A function is a relation between two elements of two given sets condition that for each element in the domain there's one and only one image(*).
(*)That is: if $R$ is a function, $x_1\in Dom(f)$ and $y_1,y_2\in Im(f)$,
$$
x_1Ry_1 \wedge x_1Ry_2 \iff y_1=y_2
$$
Best Answer
An index set is just the domain $I$ of some function $f:I\to X$. It's just a notational distinction between a function domain and an index set - when we think if it as an index set, we write $f_i$ rather than $f(i)$.
Both the Wikipedia and Wolfram links you provide indicate that the function $f$ should be $1-1$ and onto, but I don't actually think that is necessary. For example, if we have a sequence $a_1,\dots,a_n,\dots$ then the index set is $\mathbb N$ whether or not the $a_i$ are distinct.