Expanding and factoring
Expanding multiplies every term in one bracket by every term in the other; factoring performs exactly the same process in reverse.
A worked example
(x + 5)(x - 2) = x^2 + 3x - 10. To factor it back again, find two numbers multiplying to -10 and adding to 3, which are 5 and -2.
The mistake people actually make
Don't lose the middle term when expanding two brackets. A difference of squares such as x^2 - 36 has no middle term, and it factors directly to (x - 6)(x + 6).