Potential energy can be defined as the measure of the ability to do work. Common examples of potential energies are gravitational potential energy and electrostatic potential energy.
The potential energy of an object, in general, depends on its position relative to a reference point.
Additionally, the potential energy depends on the physical property of the object, depending on the type of potential measured.
For example, gravitational potential energy depends on the object's mass and electrostatic potential energy depends on the object's charge.