How to factor a polynomial with the factor theorem
The factor theorem says that x − k is a factor exactly when P(k) equals zero, so testing the integer factors of the constant term finds a first factor, and dividing it out leaves a quadratic that you can factor in the usual way.
A worked example
Factor P(x) = x³ − 4x² + x + 6. The possible integer zeros are the factors of 6: ±1, ±2, ±3 and ±6. Testing gives P(−1) = −1 − 4 − 1 + 6 = 0, so x + 1 is a factor. Dividing by x + 1 leaves x² − 5x + 6, which factors as (x − 2)(x − 3). Therefore P(x) = (x + 1)(x − 2)(x − 3).
The mistake people actually make
A zero at x = −1 gives the factor x + 1, with the opposite sign. Test values by substituting carefully, because a single sign error makes a true zero look like a non-zero value.