Center of mass
The center of mass of a distribution of mass in space is the unique point where the weighted relative position of the distributed mass sums to zero or the point where if a force is applied causes it to move in direction of force without rotation.
In the case of a single rigid body, the center of mass is fixed in relation to the body, and if the body has uniform density, it will be located at the centroid. The center of mass may be located outside the physical body, as is sometimes the case for hollow or open-shaped objects, such as a horseshoe.
Center of gravity
A body’s center of gravity is the point around which the resultant torque due to gravity forces vanishes. Where a gravity field can be considered to be uniform, the center of mass and the center of gravity will be the same. However, for satellites in orbit around a planet, in the absence of other torques being applied to a satellite, the slight variation in gravitational field between closer to and further from the planet can lead to a torque that will tend to align the satellite such that its long axis is vertical. In such a case, it is important to make the distinction between the center of gravity and the center of mass. Any horizontal offset between the two will result in an applied torque.
It is useful to note that the center of mass is a fixed property for a given rigid body , whereas the center of gravity may, in addition, depend upon its orientation in a non-uniform gravitational field. In the latter case, the center of gravity will always be located somewhat closer to the main attractive body as compared to the center of mass and thus will change its position in the body of interest as its orientation is changed.
Referring to the mass-center as the center of gravity is something of a colloquialism, but it is in common usage and when gravity gradient effects are negligible, center-of-gravity and cente of mass are the same and are used interchangeably.