It might be better to call potential energy "positional energy" since it is the energy a body has due to its position.
Consider lifting a pen from the floor to your desk. The overall change in potential energy is unrelated to the path you took, whether direct or loopy.
Key Concepts
Work is done on a body to lift it at constant velocity. Work done = force x distance:
\(F=Wh=mgh\)
Remember when something is lifted at constant velocity the forces are balanced. No kinetic energy is gained.
A common mistake is to think that 'mgh' is the general equation for Ep. However, this only applies close to the Earth (where the gravitational field is uniform).
The gravitational field of the Earth is only uniform close to it. If we take a spacecraft away from the Earth, gravitational field strength will decrease. This means that the work done to increase the distance per metre will also decrease.
The area under a work done - distance graph gives the potential energy change.
How much of Potential energy have you understood?