Positive charges repel each other, so if I place two positive charges near one another and let ago, they will start moving, gaining kinetic energy. Where does this energy come from? Each charge is being pushed by the electric force, and is moving in the same direction as it is being pushed, so the electric force is doing positive work on the charge.
But work is merely the transfer of energy; the energy still has to have a source, and in this case the source is the electric field. Just like gravity, the electric force is conservative, which means that it has an associated potential energy which falls and rises as the electric field does positive or negative work. We can think of potential energy as something like a storage tank for energy. When the electric field does positive work on a charge (as in the example above), the potential energy of the field decreases as the tank is depleted of energy. Conversely, the potential energy increases when the electric field steals energy by doing negative work (by slowing down a charge, for instance). Electric potential energy is a function of the relative positions of the charges in a system; it doesn't depend on how the charges got where they are, only where they are right now.
If a charge starts moving spontaneously (that is, without any outside forces) due to the electric force, then it will move in the direction which decreases its potential energy. For a charge to start moving at all, it has to gain kinetic energy which must come from somewhere, and if there is nothing else pushing it, that energy must come from the electric potential energy, which drops as a result. One might say that the potential energy drops when the system does what it "wants" to do, or when the system is "relaxing", analogous to what happens in a spring whose potential energy decreases. Conversely, if the potential energy increases, then the system is "tensing": e.g. pulling two opposite charges away from each other will increase their potential energy because they are pulling back. Go through the example above again and see if this idea makes it easier to determine what the potential energy does.
Work done by the electric field depletes the potential energy by the same amount, so we can relate the work W done to a charge to the change in potential energy ΔP:
Both sides of the final equation have a final value minus an initial value, and so one might suppose that we can match initial term with initial term, and final with final. This is too restrictive an assumption, however; the most we can assume from this result is that
Here is a graph of the potential energy equation in two circumstances, as two charges move farther away from each other. If the charges have the same sign, so that qsqt>0, then the potential energy decreases as the charges separate; if the charges have opposite sign, the potential energy increases from negative infinity. In both cases, the potential energy approaches the same value P∞: from above if the charges repel, from below when they attract. It's important to remember that when we say that the "potential energy is increasing", we mean that it is becoming more positive, not that it is gaining a greater magnitude: P = –∞ is the lowest possible potential energy two charges can have, not P = 0.
The variable P∞, called the baseline, is the potential energy that the two charges have if they are infinitely far apart (which you can see by evaluating the formula above with d=∞). It is a completely arbitrary constant; that is, we can set it equal to whatever we like, without affecting the physical result of our calculation. It is common to set it equal to zero to get rid of the second term in the equation above, but it isn't necessary.
The choice of baseline P∞ is entirely up to you, and that mean that the potential energy of any given configuration of charges is also completely arbitrary: you might find that two charges have a potential energy of 1J or 0J or -15,000J. This doesn't matter, however, because only changes in potential energy really matter. This was true with gravitational potential energy as well: the potential energy of a mass m is given by mgh, but what is the height h measured from? One person might measure it from the floor, another from the table, another from the ceiling, and all would get different values for the energy. What really matters though, is that if the mass moves downward by some distance x, then a certain amount of potential energy mgx is converted into kinetic energy, increasing the object's speed.