5. Line $l$ lies on plane $\alpha$, line $m$ is parallel to plane $\alpha$, and is skew to line $l$. A moving point $P$ is on plane $\alpha$, and is equidistant from lines $l$ and $m$. Then the locus of point $P$ is ( ).
(A) Line
(B) Ellipse
(C) Parabola
(D) Hyperbola
5. D.

Let the projection of $m$ on plane $\alpha$ be $m^{\prime}$, and $m^{\prime}$ intersects line $l$ at point $O$.

In plane $\alpha$, establish a Cartesian coordinate system with $O$ as the origin and line $l$ as the $y$-axis. Then, the equation of $m^{\prime}$ is $y=k x$.
Let point $P(x, y)$.
The distance from point $P$ to line $l$ is $|x|$, and the distance from point $P$ to line $m^{\prime}$ is $\frac{|y-k x|}{\sqrt{1+k^{2}}}$.
Thus, the square of the distance from point $P$ to line $m$ is
$$
\frac{(y-k x)^{2}}{1+k^{2}}+a^{2},
$$

where $a$ is the distance from line $m$ to plane $\alpha$.
Therefore, the equation of the locus of point $P$ is
$$
\frac{(y-k x)^{2}}{1+k^{2}}+a^{2}=x^{2},
$$

which is a hyperbola.