Step-by-step explanation:
When a body has an electric charge, it generates an electric field around it, if we introduce an electric charge into this field, it will be affected by the first one. Experiencing a greater force the closer a charge is to the other, that is, depends on the position within the electric field. This force is conservative, so it can be found from the negative derivative of a scalar field, this field is the electric potential energy. Therefore, if the charges are of the same sign, the force will be repulsive (-) and the potential energy will be positive. If the charges are different, the force will be attractive (+) and the potential energy will be negative.