Expanding and factoring
Expanding multiplies every term by every term; factoring runs the same process backwards.
A worked example
(x + 5)(x - 2) = x^2 + 3x - 10. To factor it back, find two numbers multiplying to -10 and adding to 3: 5 and -2.
The mistake people actually make
Do not lose the middle term when expanding two brackets. A difference of squares such as x^2 - 36 has no middle term and factors to (x - 6)(x + 6).