A force that conserves mechanical energy is known as a conservative force.
Question: How do conservative forces conserve mechanical energy?
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It only takes a minute to sign up.Sign up to join this community
It conserves it by insuring the total energy, potential plus kinetic energy, is constant.
The simplest example is the force of gravity. It is a conservative force. The total mechanical energy of a mass is the sum of its kinetic and potential energy. An object of mass $m$ sits on top of a table a height $h$ from the floor. The object has gravitational potential energy equal to $mgh$ with respect to the flooor (it's always with respect to something).
The object falls off the table. The gravitational field does work on the falling object converting its potential energy at the top of the table into kinetic energy as it falls. The sum of the potential energy and kinetic energy all the way down is constant with the potential energy decreasing and kinetic energy increasing by the same amount on the way down. Mechanical energy is conserved.
Just prior to impact with the floor all the object has is kinetic energy and no potential energy. The kinetic energy is then equal to its original potential energy, or
Hope this helps.