Why do objects at rest contain energy?
There's two types of energy that an object at rest could contain: general potential and mass energy.
From your question, it seems like we understand pretty simply how a moving object can have kinetic energy.
We know that energy can be transferred. If I throw a baseball and it hits a glass bottle, some of the energy will transfer and the bottle will move.
We also know that energy must be conserved. This is easy in the baseball example, but what if instead of throwing it at the bottle, I threw it straight up.
In that case, it would get to a certain place and then fall back down. If we think about it at its maximum height, that means that it has no kinetic energy.
Where did the energy go? The gravitational field! We can "store" energy in these weird things called fields. Really what we are doing is changing the gravitational field of the Earth by the own gravity of the ball and changing that field takes energy. The field bounces back, releasing that energy into the ball, and having it fall back to the ground with the same kinetic energy.
Einstein told us that an object at rest has some equivalent energy