Question: There are plenty of formulas that use gravity acceleration of Earth. This is represented with the symbol $g$. In my school work (I am a high school student) we usually take it as $g= 9,8 \,\text m/\text s^2$. 

This thing is obviously a number that is only usable on Earth. What I want to know is that, what if I want to make my calculations according to another planet? How the number is going to change?

Answer: 
Let's see how the acceleration due to gravity is obtained for any planet, and then we can apply this to Earth or the Moon or whatever we want.

Newton's Law of gravitation tells us that the magnitude of the gravitational force between to objects of masses $m\_1$ and $m\_2$ is given by
\begin{align}
 F = G\frac{m\_1m\_2}{r^2},
\end{align}
where $r$ is the distance between their centers of mass. Now, suppose that object 1 is a planet of mass $m\_1 = M$ and radius $R$, and object 2 is a much smaller object of mass $m\_2 = m$ located at a height $h$ above the surface of the planet that is small compared to the radius of the planet. The magnitude of the gravitational force between the two objects will be
\begin{align}
 F = G\frac{Mm}{(R+h)^2}
\end{align}
on the other hand, Newton's Second Law tells us that the acceleration of object 2 will satisfy
\begin{align}
 F = ma
\end{align}
Combining these facts, namely setting the right hand sides equal, causes the mass $m$ to drop out of the equations, and the acceleration due to gravity of the object of mass $m$ becomes
\begin{align}
 a = \frac{GM}{(R+h)^2} = \frac{GM}{R^2}\left(1-2\frac{h}{R}+\cdots\right)
\end{align}
where in the second equality, I have performed a Taylor expansion of the answer in terms of the small number $h/R$. Notice that to zeroth order, namely the dominant contribution when object 2 is close to the surface of the planet, is some constant that is independent of the height and depends only on the mass and radius of the planet;
\begin{align}
 a\_0 = \frac{GM}{R^2}
\end{align}
This is precisely what we usually call the acceleration due to gravity near the surface of a planet. If you plug the numbers in for Earth, you will get
\begin{align}
 a\_0^\mathrm{Earth} \approx 9.8\,\mathrm{m}/\mathrm{s}^2
\end{align}
and I'll leave it to you to determine the number for other planets. The important property of this acceleration due to gravity is that it scales linearly with the mass $M$ of the planet, and it scales like the negative second power of the radius of the planet.
An easy way to think about this is to consider that the acceleration of gravity, at the surface of, say, a planetary body, essentially depends on two quantities: the mass of the body and the radius.

The surface acceleration increases with the mass of the body (if you double the mass, you double the acceleration) and decreases with square of the radius (if you double the radius , the acceleration is quartered).

So, for example, the Moon's radius is about 0.273 times the Earth's radius but the Moon's mass is about 0.0123 the Earth's mass. So, we would expect the acceleration at the surface of the Moon to be

$g\_m = g\_e (.0123)\dfrac{1}{(.273)^2} \approx \dfrac{g\_e}{6}$

and, sure enough, the surface gravity of the Moon is about $1.62\frac{m}{s^2}$

So, if you know the mass and radius of, say, Mars, you can determine the surface gravity of Mars as follows:

$g\_M = g\_e\dfrac{M\_M}{M\_e} \cdot \dfrac{R^2\_e}{R^2\_M}$