Graph the quadratic. If the graphed curve does not cross the x axis, the roots are complex. This means you can factor the quadratic over the complex numbers but you cannot factor it over the integers. If the graphed curve touches the x axis at one point, there is one real root. If there is only one real root, the quadratic is a perfect square and the factors are the square roots of the quadratic. If the graphed curve crosses the x axis at two points, there will be two real roots and two real factors that are different.
Find the candidate factors by looking at the first and last numbers in the quadratic. For example, for the quadratic 2x^2 - x - 6, the first number is 2, with factors 1 and 2, and the last number is 6, with factors 1, 2, 3 and 6. The candidate factors are x - 1, x + 1, x - 2, x + 2, x - 3, x + 3, x - 6, x + 6, 2x - 1, 2x + 1, 2x - 2, 2x + 2, 2x - 3, 2x + 3, 2x - 6 and 2x + 6.
Try all of the candidate factors and find that 2x^2 - x - 6 = (2x + 3)(x - 2), because 2x + 3 and x - 2 are the only candidates that do not leave a remainder when you divide them into 2x^2 - x - 6. Sometimes, like for the quadratic x^2 - 2x + 1, there will be only one factor because the quadratic is a perfect square. So x^2 - 2x + 1 = (x - 1)^2.