Answer
$$ \cot \theta + \csc \theta + C $$
Work Step by Step
$$\eqalign{
& \int {\frac{{d\theta }}{{\cos \theta - 1}}} \cr
& {\text{multiply the numerator and the denominator}}\cr
& {\text{by the conjugate of the denominator}} \cr
& \int {\frac{1}{{\cos \theta - 1}}} \left( {\frac{{1 + \cos \theta }}{{1 + \cos \theta }}} \right)d\theta \cr
& {\text{use }}\left( {x + y} \right)\left( {x - y} \right) = {x^2} - {y^2} \cr
& = \int {\frac{{1 + \cos \theta }}{{{{\cos }^2}\theta - 1}}} d\theta \cr
& {\text{use the identity co}}{{\text{s}}^2}x + {\sin ^2}x = 1 \cr
& = -\int {\frac{{1 + \cos \theta }}{{{{\sin }^2}\theta }}} d\theta \cr
& = -\int {\left( {\frac{1}{{{{\sin }^2}\theta }} + \frac{{\cos \theta }}{{{{\sin }^2}\theta }}} \right)} d\theta \cr
& = -\int {\left( {\frac{1}{{{{\sin }^2}\theta }} + \frac{1}{{\sin \theta }}\frac{{\cos \theta }}{{\sin \theta }}} \right)} d\theta \cr
& = -\int {\left( {{{\csc }^2}\theta + \csc \theta \cot \theta } \right)} d\theta \cr
& {\text{by basic integration formulas}} \cr
& = \cot \theta + \csc \theta + C \cr} $$