This question already has an answer here:
If we consider two objects of masses $m$ separated by a distance $r$, and the potential at infinity is assumed to be zero, then $-Gmm/r$ is the potential energy. But is it of the system or of the individual objects? Also, suppose we were to apply conservation of mechanical energy, if the objects are released, then would we use gravitational potential energy of both the objects separately in our equations?
Also, when we say potential at infinity is zero, what do we mean exactly?