The "rational root theorem", that LogicalTime mentions, says that if m/n is a rational number root of [itex]a_px^p+ a_{p-1}x^{p-1}+ \cdot\cdot\cdot+ a_0= 0[/itex] then the numerator m must divide [itex]a_0[/itex] and and n must divide [itex]a_p[/itex].
In your example, [itex]-x^3 +10x^2 - 27x + 18[/itex], any rational root m/n must have n dividing 1 (and so is either 1 or -1) and m dividing 18: m/n must be one of 1, -1, 2, -2, 3, -3, 6, -6, 18, or -18.
It is easy to calculate that [tex]-(1)^3 +10(1)^2 - 27(1) + 18= 0[/tex] so x-1 is a factor. Divide [tex]-x^3 +10x^2 - 27x + 18[/tex] by x-1 to get the other, quadratic, factor. In this particular case you can factor that into linear factors.
However, you should understand that most cubics, like most quadratics, cannot be factored into factors with only integer or rational number coefficients.
You can factor a quadratic polynomial without rational zeros by using the quadratic formula: for example [itex]x^2- 3x+ 4[/itex] has no rational roots but we can solve [itex]x^3- 5x+ 3= 0[/itex] using the quadratic formula:
[tex]x= \frac{3\pm\sqrt{25-12}}{2}= \frac{3\pm\sqrt{13}}{2}[/tex]
which tells us
[tex]x^3-5x+ 3= (x- \frac{3- \sqrt{13}}{2})(x-\frac{3+\sqrt{13}}{2})[/tex]
For cubic polynomials you could use the cubic formula but that is much more complicated.