The position of the centre of gravity of any body will depend on the type of shape it has i.e. (on the distribution of mass on the body) in it. It changes if the shape of the body is deformed.
For example, the centre of gravity of a wire is a its mid point. However, if the wire is turned in a way that it makes a circle then its centre of gravity will be at the centre of the circle.