Could someone help to explain to me how factoring is used to solve quadratic equations?

and could you give me some examples to solve?