Quadratic formula (I won't put the details, they are found on Wiki) :
You can define a "discriminant" (to know where it comes from, wikipedia) :
If this discriminant is negative, then the equation has no solution in R and cannot be factorized (you'll see later it has solutions, though).
If this discriminant is zero, then the equation has one root (solution). In fact, it has two, but they are the same. This solution is :
If this discriminant is positive, then the equation has two distinct roots :
There you go