The equation is a second-order linear differential equation; in standard form,
$$\frac{\mathrm{d}^2 \theta(t)}{\mathrm{d}t^2} + k^2\theta = 0$$
For the case of constant coefficients, one must simply propose the ansatz $\theta(t)=e^{Rt}$, where $R$ is a constant. Plugging into the differential equation yields,
$$e^{Rt}(R^2+k^2) = 0$$
This is only the case when $R^2+k^2=0$, which has solutions $R=\pm i k$. Using Euler's formula, we can express the two solutions of the differential equation as,
$$\theta_1 = \cos(kt) + i\sin(kt), \, \, \, \, \theta_2 = \cos(kt) - i\sin(kt)$$
However, recall the superposition principle applies to this differential equation, and hence any linear combination of these solutions is also a solution. We construct the following new solutions:
$$\Theta_1 = \frac{1}{2}(\theta_1 + \theta_2) = \cos(kt)$$
$$\Theta_2 = \frac{1}{2i}(\theta_1-\theta_2) = \sin(kt)$$
We can once again combine these solutions, and introduce two arbitrary constants (determined by initial conditions) to propose the general solution,
$$\theta(t) = c_1 \cos(kt) + c_2\sin(kt)$$
The equation is well-known, and that of a classical harmonic oscillator. Any calculus text should offer a treatment of a second-order ODE with constant coefficients. See http://tutorial.math.lamar.edu/ for free online calculus resources. The free course http://ocw.mit.edu/courses/mathematics/18-03-differential-equations-spring-2010/ also offers a thorough introduction to differential equations.