How do I solve the ODE
$$\dfrac{d\theta}{dt} = -\sqrt{2K(\cos{\theta} - \cos{\theta_0})}$$
where $K$ is positive, and $\cos{\theta} \geq \cos{\theta_0}$?
You mention in a comment to the problem statement that someone told you that this ODE described the motion of a pendulum, which is indeed true. The compound pendulum (and special cases like the physical pendulum and simple pendulum) are discussed in most college level physics courses (see, for example, any recent edition of Halliday and Resnick's "Fundamentals of Physics" by Jearl Wilson). If $\theta$ is the angular displacement of the pendulum from the vertical (\(\theta = 0\) defines the vertical), and motion is restricted to a plane, then its angular acceleration is proportional to $\sin{\theta}$. To simplify the writing a little, I'll sometimes use Newton's notation for a time derivative, a dot placed above the function being differentiated: for example, $\dot{\theta} \equiv d\theta/dt$. The equation of motion for a physical pendulum is shown in the textbooks to be the nonlinear ODE \(\ddot{\theta} = -K \sin{\theta}\), where the two dots denote the second derivative of $\theta$, or angular acceleration, and \(K\) is a positive constant involving the geometry of the pendulum, the distribution of its mass, and the gravitational field of the Earth. The ODE of your problem statement is, as will be shown in a moment, a first integral of the equation of motion.
Dzung Nuyen has instead taken the interesting approach of showing that the equation of motion can be derived from your first integral by differentiating it. For small values of $\theta$ for which $\sin{\theta} \approx \theta$, the equation of motion is a linear ODE whose solutions are the simple harmonic solutions given by Dzung Nuyen.
However, you asked how to solve the first-order ODE for all values of $\theta$ satisfying $\cos{\theta} \geq \cos{\theta_0}$, so it is probably better to begin with the equation of motion and show how your ODE follows from it. First, multiply both sides of the equation by $\dot{\theta}$ to obtain \(\dot{\theta} \ddot{\theta} = -K \dot{\theta} \sin{\theta}.\) Using the chain rule for time derivatives, this is equivalent to
\[\frac{d}{dt}\left(\frac{\dot{\theta}^2}{2} - K \cos{\theta}\right) = 0,\]
from which it follows that \(\dot{\theta}^2 = 2K \cos{\theta} + C ,\) where $C$ is an arbitrary integration constant. To determine $C$ we need initial values for both $\theta(t)$ and $\dot{\theta}(t)$. Thus, at some initial time, say, $t = 0$, we should be given $\theta(0) = \theta_0$ and $\dot{\theta}(0) = \dot{\theta}_0$, from which we find $C=\dot{\theta}^2_0 - 2K \cos{\theta_0}$. Substituting for $C$ we obtain at any later time:
\[\dot{\theta}^2 = 2K \left(\cos{\theta} - \cos{\theta_0}\right) + \dot{\theta}_0^2.\]
What is missing in your problem statement is the essential initial condition $\dot{\theta}_0 = 0$, which reduces the first integral to
\[\dot{\theta}^2 = 2K \left(\cos{\theta} - \cos{\theta_0}.\right)\]
These initial conditions correspond, physically, to the pendulum being displaced initially to an angle of $\theta_0$, and then released from rest (zero angular velocity initially). Solving for $d\theta/dt$ by taking the square root of both sides yields
\[\frac{d\theta}{dt} = \sqrt{ 2K \left(\cos{\theta} - \cos{\theta_0}\right) }\,.\]
$$\dfrac{d\theta}{dt} = -\sqrt{2K(\cos{\theta} - \cos{\theta_0})}$$
where $K$ is positive, and $\cos{\theta} \geq \cos{\theta_0}$?
You mention in a comment to the problem statement that someone told you that this ODE described the motion of a pendulum, which is indeed true. The compound pendulum (and special cases like the physical pendulum and simple pendulum) are discussed in most college level physics courses (see, for example, any recent edition of Halliday and Resnick's "Fundamentals of Physics" by Jearl Wilson). If $\theta$ is the angular displacement of the pendulum from the vertical (\(\theta = 0\) defines the vertical), and motion is restricted to a plane, then its angular acceleration is proportional to $\sin{\theta}$. To simplify the writing a little, I'll sometimes use Newton's notation for a time derivative, a dot placed above the function being differentiated: for example, $\dot{\theta} \equiv d\theta/dt$. The equation of motion for a physical pendulum is shown in the textbooks to be the nonlinear ODE \(\ddot{\theta} = -K \sin{\theta}\), where the two dots denote the second derivative of $\theta$, or angular acceleration, and \(K\) is a positive constant involving the geometry of the pendulum, the distribution of its mass, and the gravitational field of the Earth. The ODE of your problem statement is, as will be shown in a moment, a first integral of the equation of motion.
Dzung Nuyen has instead taken the interesting approach of showing that the equation of motion can be derived from your first integral by differentiating it. For small values of $\theta$ for which $\sin{\theta} \approx \theta$, the equation of motion is a linear ODE whose solutions are the simple harmonic solutions given by Dzung Nuyen.
However, you asked how to solve the first-order ODE for all values of $\theta$ satisfying $\cos{\theta} \geq \cos{\theta_0}$, so it is probably better to begin with the equation of motion and show how your ODE follows from it. First, multiply both sides of the equation by $\dot{\theta}$ to obtain \(\dot{\theta} \ddot{\theta} = -K \dot{\theta} \sin{\theta}.\) Using the chain rule for time derivatives, this is equivalent to
\[\frac{d}{dt}\left(\frac{\dot{\theta}^2}{2} - K \cos{\theta}\right) = 0,\]
from which it follows that \(\dot{\theta}^2 = 2K \cos{\theta} + C ,\) where $C$ is an arbitrary integration constant. To determine $C$ we need initial values for both $\theta(t)$ and $\dot{\theta}(t)$. Thus, at some initial time, say, $t = 0$, we should be given $\theta(0) = \theta_0$ and $\dot{\theta}(0) = \dot{\theta}_0$, from which we find $C=\dot{\theta}^2_0 - 2K \cos{\theta_0}$. Substituting for $C$ we obtain at any later time:
\[\dot{\theta}^2 = 2K \left(\cos{\theta} - \cos{\theta_0}\right) + \dot{\theta}_0^2.\]
What is missing in your problem statement is the essential initial condition $\dot{\theta}_0 = 0$, which reduces the first integral to
\[\dot{\theta}^2 = 2K \left(\cos{\theta} - \cos{\theta_0}.\right)\]
These initial conditions correspond, physically, to the pendulum being displaced initially to an angle of $\theta_0$, and then released from rest (zero angular velocity initially). Solving for $d\theta/dt$ by taking the square root of both sides yields
\[\frac{d\theta}{dt} = \sqrt{ 2K \left(\cos{\theta} - \cos{\theta_0}\right) }\,.\]