Any of the six trigonometric functions can be written as a rational function of $\sin{x}$ and $\cos{x}$. If we have a rational function of $\sin{x}$ and $\cos{x}$, it can be written as a ratio of polynomials in $\sin{x}$ and $\cos{x}$. So to solve $f(\sin{x},\cos{x})=0$ for a rational function, it suffices to solve $p(\sin{x},\cos{x})=0$ for the particular polynomial $p$ in the numerator of $f$ (in lowest terms, etc.)
But by the tangent half-angle formulae, if $t=\tan{(x/2)}$, we have
$$ \sin{x} = \frac{2t}{1+t^2} , \quad \cos{x} = \frac{1-t^2}{1+t^2}, $$
so the solutions are the solutions of
$$ p\left( \frac{2t}{1+t^2} , \frac{1-t^2}{1+t^2} \right) = 0 . $$
Multiplying this by a power of $1+t^2$ then finally gives a polynomial in $t$.
For example, the equation you give is
$$ 0 = \cos{t} + \tan{t}\sec{t} = \frac{\cos^2{t}+\sin{t}}{\cos{t}} , $$
so we want to solve
$$ 0 = \cos^2{t} + \sin{t} . $$
Using the tangent half-angle formulae,
$$ 0 = \frac{(1-t^2)^2}{(1+t^2)^2} + \frac{2t}{1+t^2} = \frac{(1-t^2)^2 + 2t(1+t^2)}{(1+t^2)^2} , $$
and the numerator should simplify into the polynomial you've given.
It's simpler in this case to rewrite $\cos^2{t} = 1-\sin^2{t}$, and then you find that you need to solve
$$ 1 + \sin{t} - \sin^2{t} = 0 , $$
which is much easier and won't introduce spurious roots.