You use it when you are given 2 equations such as,
x + y = 12
y= 3x
Since you are given the value of y (3x), you can substitute that value into the second equation.
ie..,
x+y=12
x+(3x)=12
4x=12
4x/4=12/4
x=3
With the newly solved for value of x, you can sub it into one of the equations to solve for y.
x + y = 12
(3) + y = 12
y = 12-3
y = 9
So the key point is, when you are given the value of one variable sub it into the second equation!