Lift something up and you store energy in it. Raise it twice as high, or make it twice as heavy, and you store twice as much. That banked energy is gravitational potential energy, ready to become motion the moment it falls.
The change in gravitational potential energy is ΔPE = mgΔh, where m is mass, g is the gravitational field strength (about 9.8 N/kg on Earth) and Δh is the change in height. It is measured in joules.
Lift the box up a ramp, then release it. The gravitational store you fill depends only on the vertical height, not the length of the slope, so a gentle long ramp and a steep short one to the same height store the same energy. Let go and that store becomes kinetic energy, so the box reaches the bottom at the same speed whatever the ramp angle or its mass.
Use the vertical change in height, not the distance moved along a slope. On a ramp, only the vertical rise counts. Also use g as a field strength of about 9.8 N/kg (some questions use 10), and keep mass in kilograms. Confusing the slope length with the height is a frequent error.
A 3.0 kg box is lifted vertically through 2.0 m. Using g = 9.8 N/kg, find the gain in gravitational potential energy. If it is then dropped, find its speed just before it lands.