Imagine a block of mass $m$ placed on the ground. I slowly lift it up to height $h$. The work done by me on the block is $mgh$. This amount of energy is now stored in the block when it is at height $h$. This energy is called the potential energy of the block. From where did we get the word potential? Why is it called Potential energy?
Capable of being but not yet in existence; latent or undeveloped.
The block is stationary and therefore not performing work. If the block never moves, the potential energy remains unused, but "available." Energy was expended in order to place the block at $h$ height. Energy cannot be destroyed, but in this case, it can be stored.
In physics, potential energy is the energy held by an object because of its position relative to other objects, stresses within itself, attachments, electrical charge, magnetic field, mass, etc., and external forces, spring force, electric charge, magnetic field, gravity, or others.
The term potential energy was introduced by the 19th-century Scottish engineer and physicist William Rankine, although it has links to Greek philosopher Aristotle's concept of potentiality. The concept of potentiality, generally refers to any "possibility" that a thing can be said to have. Aristotle did not consider all possibilities the same, and emphasized the importance of those that become real of their own accord when conditions are right and nothing stops them. Actuality, in contrast to potentiality, is the motion, change, or activity that represents an exercise or fulfillment of a possibility, when a possibility becomes real in the fullest sense.
The work of potential forces acting on a body that moves from a start to an end position is determined only by these two positions and does not depend on the trajectory of the body. The potential field can be evaluated at those two positions to determine work. This allows the set of forces to be considered as having a specified vector at every point in space forming what is known as a vector field of forces, or a force field. Furthermore, the force field is defined by this potential function, which is also called potential energy.
The term "potential" itself is a historical term that was carried into current practice, through the normal accident and convenience of the development of the physics and mathematics, from the natural philosophy at its root.
The block in itself has no energy. If you build a kettle of water around it, the water will not heat up. If you attach axles to it, the axles will not suddenly start spinning.
However, since we spent energy bringing the block up, the law on conservation of energy dictates us that we should be able to get energy back when we bring it down again. So... if we attach a cable to it, connected to a pulley and a generator, we can use it to generate electrical energy (which is done in practice. It's called a mechanical battery).
So, the rock has the potential to give energy. Hence, "potential energy".