Electric potential energy (also known as "electrostatic potential energy") is a potential energy associated with the conservative Coulomb forces within a defined system of point charges. The term "electrostatic potential energy" is preferred here because it seems less likely to be misunderstood. The reference zero is usually taken to be a state in which the individual point charges are very well separated ("are at infinite separation") and are at rest. :§25-1 The electrostatic potential energy of the system (UE), relative to this zero, is equal to the total work W that must be done by a hypothetical external agent in order to bring the charges slowly, one by one, from infinite separation to the desired system configuration:
In this process the external agent is deemed to provide or absorb any relevant work, and the point charge being slowly moved gains no kinetic energy.
Sometimes people refer to the potential energy of a charge in an electrostatic field. This actually refers to the potential energy of the system containing the charge and the other charges that created the electrostatic field.:§25-1
To calculate the work required to bring a point charge into the vicinity of other (stationary) point charges, it is sufficient to know only (a) the total field generated by the other charges and (b) the charge of the point charge being moved. The field due to the charge being moved and the values of the other charges do not need to be known. Nonetheless, in many circumstances it is mathematically easier to add up all the pairwise potential energies (as below).
It is important to understand that electrostatics is a 18th-19th-century theory of hypothetical entities called "point charges". Electrostatics is categorically not a complete theory of the charged physical particles that make up the physical world, and are subject to the Heisenberg uncertainty principle and other laws of quantum mechanics.