Mechanic energy: Is it really constant? Imagine we have a body falling. We take into account only two energies: potential gravitational and kinetic. The sum of both is called mechanical energy, which is constant. At the start of the fall, we have a kinetic energy of 0, and a potential gravitational energy of $x$. When the body finishes falling, it is backwards. We have a kinetic energy of $x$ and a potential gravitational energy of 0, but isn't the kinetic energy related to the movement? If the body finished the fall, it is not moving, so why do we have kinetic energy?
 A: First, we are assuming the only force present is gravity; no air resistance.  Second, we are assuming there is no change in the internal energy of the body; that is, the body does not "heat up".  The change in kinetic energy (KE) is due to work done on the body by the force of gravity which is positive since the body is falling and gravity causes an increase in KE.  That is
$(1) \Delta KE = \int_1^2 m\vec g \cdot d\vec r$, where $\Delta KE$ is the change in kinetic energy (final minus initial KE), and the right-hand side is the definition of the work done by gravity for the actual path travelled by the body $\vec r$ from 1 to 2. $KE = {1 \over 2}mv^2$ where $m$ is mass and $v$ is speed.
The negative of the work one by gravity can be expressed as the change in the gravitational potential energy. So (1) can be expressed as
$(2) \Delta KE = - mg\Delta h$ where $\Delta h$ is the change in height (final minus initial height)
For a falling body $\Delta h$ is negative so by (2) the change in KE is positive and equal to $mgx$ where $x$ is the height from which the body is dropped. That is, $-h$ is $x$ in your question.  So the final KE is ${1 \over 2}mv^2 = mgx$ where $v$ is the final velocity before the body strikes the ground, assuming an initial speed if zero.
You asked "isn't the kinetic energy related to the movement?". KE is just related to mass and speed squared; the change in KE is related to the work done on the body which in general depends on the net force acting on the body and actual path in 3D taken by the body as it moves.  No matter the path taken the body, the work done by gravity depends only on the change in vertical distance.  That is why we evaluate the work done by gravity as the negative of the change in potential energy using (2) instead of evaluating the right-hand side of (1) over the actual path of the body.  (But for this problem I think the body is just falling vertically, not also moving horizontally like an artillery shell.)
You asked " If the body finished the fall, it is not moving, so why do we have kinetic energy?".  We calculated the KE of the body just before it contacts the ground.  Once the body contacts the ground, a force from the ground on the body changes the KE of the body to zero. That is, the ground force does work (very quickly) on the body to decrease its KE to zero.  Such a quick-acting force is called an impulse force; a very strong force over a very short time duration. Also, if the body is not completely rigid, its internal energy can change (shape from impact and temperature from heating).
Let me know if any of this is not clear.
A: The kinetic energy is the energy just before hits the ground. When the body hits the ground a new entity appears (the ground and the force that exercise on the body) which is not present in your equation of motion (when the body is falling).
So at that moment the body hits  the ground you should add another force and there is a work against this force.
https://farside.ph.utexas.edu/teaching/301/lectures/node75.html
A: Usually people idealize collisions as an instantaneous event, and do not pay attention to what happens during the collision. But energy is conserved during a collision.
Consider an elastic collision. A ball hits the floor and bounces. For a ball to do this, it has to be made of a springy material. During the collision, the bottom of the ball hits the floor and stops. The rest of the ball keeps going. The ball deforms and stretches. A stretched spring stores potential energy and exerts a force that decelerates the rest of the ball to a stop.
Then the stretched spring pulls itself back into shape. This releases the potential energy, accelerating the ball upward.
Consider an inelastic collision. This happens with a non-springy material like wet clay. The ball deforms as the collision progresses. It takes a force to deform clay. Every force has an equal and opposite reaction, which slows the ball. But this time, the kinetic energy is not stored as potential energy. It is converted to internal energy. The atoms in the clay vibrate a little faster, and the clay gets a little hotter.
