If I place two positive charges next to each other and let go, they will shoot off in opposite directions. Motion requires energy, so where does that energy come from? It must come from the fact that they are pushing each other: and when a force gives energy to an object, as you’ll recall, we call that work. When the force is applied in the same direction as the object, as is happening here, then the work done is positive, which means that the charges are being given energy, which it converts into kinetic energy so that it can begin to move.
But where does this energy come from? When you stretch a spring and then let go: elastic potential energy that is stored in the spring is converted into kinetic energy. When you drop a ball, gravitational potential energy stored in the bond between the ball and the Earth is turned into kinetic energy as the ball accelerates downward. In both cases, the potential energy decreases when the system is doing what it “wants” to do (when the spring relaxes or when the ball falls), and it increases when the system is doing what it doesn’t want to do.
In the same way, there is a type of potential energy, called electric potential energy, present whenever two or more charges come together. Positive charges want to move farther apart: you have to do positive work to push them together, which then becomes potential energy stored in the bond between the two charges, just as energy is stored in a mattress spring when you lie down. Thus positive charges have a lower potential energy when they are farther apart, and a higher potential energy when they are closer together. The same is true for two negative charges, but reversed when the charges are opposite, since they want to be closer together. A