How did we find the solution? In my lecture notes, I read that "We know that $$x^2 \equiv 2 \pmod {7^3}$$ has as solution $$x \equiv 108 \pmod {7^3}$$"
How did we find this solution? 
Any help would be appreciated!
 A: The numbers are small, so general techniques are not necessary. However, we describe, in this particular case, the method of Hensel Lifting. 
It is clear that the solutions modulo $7$ are $x\equiv \pm 3\pmod{7}$. We lift the solution $x\equiv 3\pmod{7}$ to a solution of $x^2\equiv 2\pmod{7^2}$. 
Any solution to $x^2\equiv 2\pmod{7^2}$ that is congruent to $3$ modulo $7$ has shape $x=3+7t$. Square. Modulo $7^2$, the result is congruent to $9+(2)(3)(7)t\pmod{7^2}$. We want this to be congruent to $2$ modulo $7^2$, so we want
$$9+(2)(3)(7)t\equiv 2\pmod{7^2}.$$
A little manipulation turns this to
$$(2)(3)t\equiv -1\pmod{7}.$$
Thus $t=1$ works, and we have
$$x\equiv 10\pmod{7^2}.$$
Now lift this solution to a solution of $x^2\equiv 2\pmod{7^3}$. We look for a solution of the shape $x\equiv 10+7^2t\pmod{7^3}$. 
Squaring, we get
$$100+(2)(10)(7^2)t\equiv 2\pmod{7^3},$$
which simplifies to 
$$(2)(10)t\equiv -2\pmod{7}.$$
A solution is $t\equiv 2\pmod{7}$. That gives solution $x\equiv 10+2(49)\pmod{7^3}$.
By general theory, the only solutions are therefore $x\equiv \pm 108\pmod{7^2}$.
Remark: If we wished to, we could continue, and lift to a solution modulo $7^4$, $7^5$, and so on. 
Hensel lifting is an important general technique for solving polynomial congruences modulo prime powers.  
A: Once you know that $108$ is one solution, you can exhaust the solution list as follows: noting $108^2=11664=2+34\times7^3$, you can write
$$
x^2\equiv 108^2 (\text{mod } 7^3)\implies7^3|(x-108)(x+108).
$$
Because $(x+108)-(x-108)=216$ is not divisible by $7$, we must either have $7^3|x-108$ or $7^3|x+108$. So you actually have 2 solutions: $x\equiv\pm 108(\text{mod }7^3$). These are all the solutions to $x^2\equiv 2(\text{mod }7^3)$.
A: For example, $3^2=2\bmod 7$. So $(3+7k)^2=2+7+42k\bmod 7^2$. So $k=1$ and $10^2=2\bmod 7^2$. So $(10+7^2h)^2=2+2\cdot7^2(1+10h)\bmod 7^3$. So $h=2$. Bother! Is the crummy formatting my fault or the iPhone 6+ ?
A: Check this proof of Hensel's Lemma, which is basically the justification/proof of why what André did works, to go over the following:
$$x^2=2\pmod 7\iff f(x):=x^2-2=0\pmod 7\iff x=\pm 3\pmod 7$$
Choose now one of the roots, say $\;r=3\;$ , and let us "lift" it to a solution $\;\pmod{7^2}\;$ (check this is possible since $\;f'(3)=6\neq 0\pmod 7\;$)
$$s:=3+\left(-\frac77\cdot 6^{-1}\right)\cdot=3-(-1)^{-1}\cdot7=3+7=10$$
and indeed
$$f(10)=10^2-2=98=0\pmod{49=7^2}$$
Again:
$$s=10+\left(-\frac{98}7\cdot20^{-1}\right)\cdot7=10+14\cdot22\cdot7=2,166=108\pmod{7^3=343}$$
and indeed
$$f(108)=108^2-2=11,662=0\pmod{7^3}$$
Of course, you can repeat the above with every root in each stage.
A: Without referring to Hensel I'd make the "Ansatz"
$$x=a\cdot 7^2+b\cdot7+c$$
with $|a|$, $|b|$, $|c|$ integers $\leq3$. This is no restriction of generality. The condition $x^2=2\ (7^3)$
leads to
$$(b^2+2ac)\cdot7^2+2bc\cdot7+ c^2-2=0\quad(7^3)\ .\tag{1}$$
It follows that $c^2=2\ (7)$, which implies $c=\pm3$. Plugging this into $(1)$ gives
$$(b^2\pm 6a)\cdot7^2 \pm 6b\cdot7+7=0\quad(7^3)\ ,$$
and dividing by $7$ leads to
$$(b^2\pm 6a)\cdot7+(\pm 6b+1)=0\quad(7^2)\ .\tag{2}$$
This implies $b=\pm1$. Inserting this into $(2)$ and dividing by $7$ again we obtain
$$(1\pm 6a)+1=0\quad(7)\ ,$$
and this is solved by $a=\pm2$. 
Therefore all solutions of the original equation have to be of the form
$$x=\pm(2\cdot7^2+1\cdot7+3)=\pm 108\quad(7^3)\ .$$
It is easily checked that $\pm108$ indeed does the job.
