Energy is the ability to make something move or change. Two of its most important forms are the energy of motion and the energy stored by position.
Anything that moves has kinetic energy: a rolling cart, a thrown ball, wind, a flowing river. The faster it moves, the more it has. Speed counts twice (it is squared), so going twice as fast means four times the kinetic energy.
Lifting something stores energy in it, ready to turn into motion when it falls: a cart at the top of a hill, a book on a shelf, water behind a dam. Twice as high stores twice as much. This is gravitational potential energy. Energy can also be stored in a stretched spring (elastic) or in food and fuel (chemical).
As the cart rolls down, potential energy turns into kinetic energy. As it climbs, kinetic energy turns back into potential energy. With no friction the total never changes. This is the law of conservation of energy: energy is never made or destroyed, only changed from one form to another.
The dashed energy line shows the highest point the cart's energy can lift it to. It can roll over any hill below the line and none above it.
Friction turns some of the energy into thermal energy: the wheels, track and air warm up a little. The energy line sinks, so each climb ends lower, until the cart stops. The energy has not disappeared. It has spread out as heat, and the total (kinetic + potential + thermal) is still the same.
Mass. A heavier cart has more of every kind of energy, but at each height it moves at the same speed as a light one. The extra mass needs more energy to move, and its height gives it exactly that much more.