Mechanical energy is that which is produced from the work of one body that can be transferred to another.
Mechanical energy is the result of the sum of the energy produced by the movements of bodies (kinetic energy) with the energy produced through the interaction of bodies related to their position (gravitational energy or potential energy elastic).
This sum can be represented by the formula below:

According to the International System (SI), the unit of measurement resulting from the mechanical energy formula is the Joule, represented by the letter J.
In a clearer example, let's imagine an apple falling from a tree. In this movement, it has kinetic energy, as it is in motion and acquires speed; and it also has gravitational potential energy, as it has the force of gravity that acts on the apple, causing it to fall to the ground.
Principle of Mechanical Energy Conservation
When mechanical energy originates from a system where there is no friction, based on conservative forces, the resulting energy will remain constant, that is, the energy of a body will be constant when the change occurs only in the energy modalities (kinetic, mechanical, potential).
Kinetic energy
One of the parts used in the sum of mechanical energy, kinetic energy is the energy resulting from the transfer of energy from the system that sets the body in motion.
See more about the meaning of Kinetic energy.
Potential energy
Another energy part of the sum of mechanical energy, the potential energy is that which is present in the bodies, giving them the ability to do work.
When energy is related to the strength of the weight, the energy is called gravitational potential energy. When it is related to an elastic force, it is called elastic potential energy.
See also the meaning of Potential energy.