$kx\equiv l\pmod{\!m}$ solvable $\!\iff\! d:=(k,m)\mid l$. If so it has $d$ solutions The Theorem state:
If $(k,m)=d,$ then the congruence
$$(1)\ kx≡l(mod\ m)$$
is soluble if and only if $d|l.$ It has then just d solutions. In particular, if $(k,m)=1,$ the congruence has always just one solution.
Here is one part of the proof:
If $d＞1,$ the congruence (1) is clearly insoluble unless $d|l.$ If $d|l,$ then
$$m=dm',\ k=dk',\ l=dl',$$
and the congruence is equivalent to 
$$(2)\ k'x=l'(mod\ m').$$
Since $(k',m')=1,$ (2)has just one solution. If this solution is
$$x≡t(mod\ m'),$$
then
$$x=t+ym',$$
and the complete set of solutions of (1) is found by giving $y$ all values which lead to values of $t+ym'$ incongruent to modulus $m.$ Since 
$$t+ym'≡t+zm'(mod\ m)≡m|m'(y-z)≡d|(y-z)$$
there are just d solutions, represented by
$$t,\ t+tm',\ t+2m',…,\ t+(d-l)m'$$
This proves the theorem.
I don't know why the complete set of solutions of (1) is given by all $y$ values lead to values of $t+ym'$ incongruent to modulus m and why does $d|(y-z)$ shows there are just $d$ solutions.
 A: $x\equiv t\bmod{m'}$ is, by hypothesis, a solution. 
It follows that for all $y$, $x=t+ym'$ is a solution. But it may be that two different values of $y$ give the same solution, modulo $m$ – which, since we are solving a congruence to the modulus $m$, means those two values of $y$ give the same solution. So we only want values of $y$ that give solutions that are incongruent, modulo $m$. The condition for two values of $y$, call them $y$ and $z$, to give the same solution modulo $m$ is obtained in your second-last display; it turns out to be $d\mid(y-z)$. So we get solutions incongruent modulo $m$ by taking $y=0,1,\dots,d-1$ (you seem to have written $d-l$ where what's wanted is $d-1$), since no two of these $d$ values of $y$ differ by a multiple of $d$, but any other value of $y$ will differ from one of these values of $y$ by a multiple of $d$, so must be excluded. So, there are $d$ values of $y$, hence, $d$ solutions. 
A: The essence is simple: $\ ym'\bmod dm' =\, (\color{#c00}{y\bmod d})\, m'\ $ by the mod Distributive Law.  The $\small\rm RHS$  takes exactly $\,\color{#c00}d\,$ values, namely $\,\color{#c00}0m',\, \color{#c00}1m',\, \color{#c00}2m', \ldots, (\color{#c00}{d\!-\!1})m',\, $ so ditto for $\,t+\small\rm RHS$.
A: Since $\frac {k}{d}$ and $\frac {m}{d}$ belong to $\Bbb Z,$ the necessity of $d|l$ for a solution $x\in \Bbb Z$ of the congruence to exist can be shown by $$kx\equiv l \pmod m\implies \frac {kx-l}{m}\in \Bbb Z\implies$$ $$\implies \frac {kx-l}{m}\cdot\frac {m}{d}\in \Bbb Z\implies$$ $$\implies \frac {kx-l}{d}\in \Bbb Z\implies$$ $$\implies \frac {k}{d}\cdot x-\frac {l}{d}\in \Bbb Z\implies$$ $$\implies -\frac {l}{d}\in \Bbb Z\implies d|l. $$
