When no net external force acts on a system, the centerofmass is stationary.
One or more parts of the system can move, but other parts must move in response to keep the centerofmass in the same place.
A 90 kg man sits at one end of a 2.4 meter canoe that has a mass of 30 kg. If the man moves to the opposite end of the canoe, how far does the canoe move?
There are several ways to attack this problem. Perhaps the simplest is to say that for each distance d the man moves, the canoe must move 3d in the opposite direction for the centerofmass of the system to remain in the same place. Therefore, for each distance d the man travels relative to a fixed reference point, he moves 4d relative to the canoe. The 2.4 meter distance is relative to the canoe, so
4d = 2.4 m and d = 0.6 m relative to a fixed reference point.
The canoe moves 3d, 1.8 m, in the opposite direction relative to the reference point.
A formal solution using the centerofmass equation looks like this. Taking the origin to be where the man is initially, and using subscripts c for canoe and m for the man, we get:
X_{com}  = 

With x_{c} = 1.2 and x_{m} = 0, this gives:
X_{com}  = 

= 

=  0.3 m 
If the man moves a distance d_{m} to the right his position is now x_{mf} = d_{m}. The canoe moves a distance d_{c} to the left so its new position is x_{cf} = 1.2d_{c}.
The centerofmass equation is now:
X_{com}  = 

0.3 m  = 

Here you can use the relationship d_{c} + d_{m} = 2.4 m to reduce the equation to a single unknown and solve for d_{m}.
Plugging in d_{c} = 2.4  d_{m} gives:
d_{m} = 0.6 m, which agrees with what we got above.
Conservation of momentum is a third approach. There is zero momentum before and after the man moves, so there must be zero net momentum while he moves. The momentum he has in one direction must be cancelled out by the canoe's momentum in the other direction.