The Chinese Remainder Theorem can be stated in a few ways:
(i) If $N = N_1N_2\cdots N_k$ and the $N_i$ are pairwise coprime we have a canonical isomorphism $$\mathbb{Z}/N\mathbb{Z} \cong \mathbb{Z}/N_1\mathbb{Z} \oplus \cdots \oplus \mathbb{Z}/N_k\mathbb{Z}$$ (ii) For any $a_i \bmod N_i, \quad i = 1,\ldots, k$ there exists an $a$ such that $a \equiv a_i \bmod N_i$ for all $i$.
My question is how are these definitions equivalent and how is the isomorphism in the first definition true?
Also, the value of $a$ can be found via the Euclidean Algorithm. That is, put $M_i = N/N_i$. By assumption $M_i$ and $N_i$ are relatively prime. Then find $X_i$ with $X_iM_i \equiv 1 \bmod N_i$ and put $$a = \sum_{i=1}^k a_iX_iM_i$$
I am also confused how this uses the euclidean algorithm and finds the value of $a$.
Very simple if you observe $M_i\equiv 0\mod N_j$ for all $j\ne i$. So this value for $a$ satisfies $$a\bmod N_j =\sum_{i+1}^k (a_i X_iM_i \bmod N_j)=a_jX_jM_j\bmod N_j=a_j\bmod N_j.$$
Finding the inverse $X_i$ of $M_i$ modulo $N_i$ is done through the Extended Euclidean algorithm, which yields the coefficients $X_i$ and $Y_i$ of a Bézout's relation between $M_i$ and $N_i$: $$X_iM_i+Y_iN_i=1.$$My answer to this question shows how it works in practice.
Why the isomorphism?
There's a natural map: \begin{align*} \varphi\colon \mathbf Z&\longrightarrow \mathbf Z/N_1\mathbf Z\times\dots\times\mathbf Z/N_k\mathbf Z\\x&\longmapsto(x\bmod N_1,\dots, x\bmod N_k)\end{align*} and its kernel is $N_1\mathbf Z\cap\dots\cap N_k\mathbf Z=N\mathbf Z\;$ because the $N_i$s are pairwise coprime. So we have an injective map $$\overline\varphi\colon \mathbf Z/N\mathbf Z\longrightarrow \mathbf Z/N_1\mathbf Z\times\dots\times \mathbf Z/N_k\mathbf Z.$$ Now, condition (ii) says $\varphi$, hence $\overline \varphi$, is surjective, hence an isomorphism.