Typical question — Finding the maximum height
Kinematic equations for velocity:
\begin{aligned} v_x\left(t\right)&=v_0{\mathrm{cos} \left(\theta \right)\ } \\ v_y\left(t\right)&=-gt+v_0{\mathrm{sin} \left(\theta \right)\ } \end{aligned}
Kinematic equations for position:
\begin{aligned} x\left(t\right)&=v_0{\mathrm{cos} \left(\theta \right)\ }t+x_0 \\ y\left(t\right)&=-\frac{1}{2}gt^2+v_0{\mathrm{sin} \left(\theta \right)\ }t+y_0 \end{aligned}
Consider a projectile launched from the ground with an initial velocity $\overrightarrow{v_0}$ at an angle $\theta $ with respect to the ground. In this specific example, we assume that the origin of the coordinate system is placed at the launching point of the projectile. We then have $x_0=y_0=0$.
We label $t_1$the time at which the projectile reaches its maximum height which is where its vertical velocity cancels because it turns around. This means that, for time $t_1$, the expression $v_y\left(t\right)$ is zero which yields
\begin{aligned} v_y\left(t_1\right)=0\ \ \ \ &\Rightarrow \ \ \ \ -gt_1+v_0{\mathrm{sin} \left(\theta \right)\ }=0 \\ &\Rightarrow \ \ \ \ \ t_1=\frac{v_0{\mathrm{sin} \left(\theta \right)\ }}{g} \end{aligned}
To derive the maximum height $y_{max}$ reached by the projectile, we then simply substitute into $y\left(t\right)$ the expression found above for $t_1$.
\begin{aligned} y_{max}&=y\left(t_1\right) \\ \\ &=-\frac{1}{2}g{\left(\frac{v_0{\mathrm{sin} \left(\theta \right)\ }}{g}\right)}^2+v_0{\mathrm{sin} \left(\theta \right)\ }\left(\frac{v_0{\mathrm{sin} \left(\theta \right)\ }}{g}\right) \\ \\ &=-\frac{v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{2g}+\frac{v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{g} \\ \\ &=-\frac{v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{2g}+\frac{2v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{2g} \\ \\ &=\frac{v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{2g} \end{aligned}
The maximum height reached by the projectile is therefore given by
\boxed{y_{max}=\frac{v^2_0{{\mathrm{sin}}^2 \left(\theta \right)\ }}{2g}}