<s>[INST] Legendre symbol, what is it? I am reading wiki article about Legendre symbol and I don't understand the power meaning. Can you please explain the next expression.
$$\left(\frac ap\right)\equiv a^{\frac{p-1}{2}}\pmod p$$
 [/INST] Since  you say you have read about Legendre symbol on Wikipedia, you should already know that $\left(\frac{a}{p}\right)$ is defined as $0$ if $p\mid a$ and as $\pm1$ for $p\nmid a$, depending on whether $a$ is a quadratic residue modulo $p$ or not.
According to Euler's criterion, the congruence
$$\left(\frac{a}{p}\right) \equiv a^{(p-1)/2}$$
holds for any odd prime $p$.
There is nothing mysterious about the expression $a^{(p-1)/2}$, it is just a usual exponentiation. (It is useful to notice that $(p-1)/2$ is a positive integer if $p$ is an odd prime.)
Let us have a look on specific examples. For $p=5$ we have $(p-1)/2=2$ and we get
$$\begin{array}{|c|c|c|}
\hline
a & a^2 & \left(\frac{a}{5}\right) \\\hline
    0 & 0 & 0 \\\hline
    1 & 1 & 1 \\\hline
    2 & 4 &-1 \\\hline
    3 & 9 &-1 \\\hline
    4 &16 & 1 \\\hline
  \end{array}
$$
If you look at the second and third column, they are indeed congruent modulo $5$. 
For $p=7$ we get the following table:
$$\begin{array}{|c|c|c|}
\hline
a & a^3 & \left(\frac{a}{7}\right) \\\hline
0 & 0 & 0 \\\hline
1 & 1 & 1 \\\hline
2 & 8 & 1 \\\hline
3 &27 &-1 \\\hline
4 &64 & 1 \\\hline
5 &125&-1 \\\hline
6 &216&-1 \\\hline
\end{array}
$$
(We know that quadratic residues modulo $7$ are $(\pm1)^2\equiv1\pmod 7$, $(\pm2)^2\equiv4\pmod 7$ and $(\pm3)^2\equiv2\pmod 7$.)
You may notice that instead of calculating $a^3$ we might calculate $a^3\bmod 7$, which would is a bit easier. For example $5^3=5^2\cdot 5 \equiv 25 \cdot 5 \equiv 4\cdot 5 \equiv 20 \equiv -1 \pmod 7$.

This is more about the the basic properties of congruences rather than about the Legendre symbol, but I will try to explain the previous computation, per request in a comment by the OP.
The only thing we are using here is the fact that if $a_1\equiv b_1\pmod n$ and $a_2\equiv b_2\pmod n$, then also $a_1b_1\equiv a_2b_2\pmod n$.
Using this rule we know that 
$$25\cdot 5\equiv 4\cdot 5\pmod 7$$
since $25\equiv 4\pmod 7$.
In fact, we have even easier way to calculate $5^3 \bmod 7$. If we notice that $5\equiv -2 \pmod 7$ then
$$5^3 \equiv (-2)^3 \equiv -8 \equiv -1 \pmod 7.$$
For more about similar computations, have a look at How do I compute $a^b\,\bmod c$ by hand? and other related posts.
</s>