You’ve been taught elimination and substitution. (You should also be able to solve simultaneous equations graphically.) In the elimination method, you multiply up the equations to make them have a term that ‘matches’. Then you add or subtract the equations from one another to eliminate the variable in the term that matches. This tends in many cases to be the more efficient way of solving linear simultaneous equations, such as 5x + 7y = 19 and 3x + 2y = 7.
In the substitution method, you make a variable the subject of one equation, then substitute the expression you’ve found for that variable into the other equation. This good for linear simultaneous equations when your question is close to giving you one variable as the subject. For example, in x + 2y = 13 and 3x + 7y = 44 we’re one step away from the first equation having x as the subject. However, you can see that in the first example, 5x + 7y = 19 and 3x + 2y = 7, we’d end up with much more complicated algebra than by the elimination method. The time when you really must use substitution is when one of the equations is linear and the other is non-linear, e.g. 3x + y = 7 and xy + x^2 = 6. An equation is non-linear, roughly speaking, if it has two variables multiplying one another, or a variable raised to a different power than 1. We usually rearrange the linear equation to make one variable the subject, then substitute into the non-linear equation. To sum up, substitution works in all the cases you’ll encounter, while elimination only works for linear cases, but elimination tends to make life easier when it works. So if it looks linear, use elimination, but if it looks non-linear (or you’re really confident you can isolate one variable easily) use substitution.