Given a point in a manifold, what points of a submanifold are closest to it? Note: I'm still relatively new to studying differential / Riemannian geometry so I'm not sure if my problem is well posed or not. Any reference materials to point me to the right direction would be greatly appreciated! 
Suppose we have some ambient Riemannian manifold $(M,g)$ and we have some submanifold $S$ of it. I know that up to conditions and definitions, if one specifies two points $p$ and $q$ of $M$, one can find a minimizing geodesic between them. 
Question: But suppose we are given only one point $p \in M \setminus S$. Can one ask which point $q \in S$ is "closest" to $p$? And where "closest" is taken to mean the smallest arc length of its geodesics? Can somebody please point me to some references on this question (assuming it is well posed)? 
 A: $\newcommand{\Reals}{\mathbf{R}}$This isn't a definitive answer, just some necessary and sufficient conditions, too long for a comment.

Assume throughout that $M$ is connected.
The condition "$(M, g)$ is complete" guarantees that for every pair of points $p \neq q$, there exists a length-minimizing geodesic joining $p$ to $q$. (This follows from the Hopf-Rinow theorem.)


*

*This geodesic need not be unique: Think of antipodal points on a sphere.

*Completeness is not necessary: Think of a non-empty open convex set in some Euclidean space.
If $S$ is compact, then for general reasons your question is well-posed: If $d(p, q)$ denotes the topological metric defined by arc length, the function $d(p, \cdot)$ is continuous on $M$, hence achieves a global minimum on $S$.


*

*The "closest point" can fail to be unique. For an extreme case, take $S$ to be a circle and $p$ the center of $S$.

*Compactness of $S$ is not necessary for existence of a closest point: The distance from a plane parabola to a point not on the parabola is well-defined (though again, the "closest point" on the parabola may be non-unique if $p$ lies on the axis).
The condition you "really want" in order to guarantee a closest point is something like "properness with respect to $p$", in the sense that there exists some closed geodesic ball $B$ about $p$ such that $B \cap S$ is compact. Otherwise you get counterexamples of the type:


*

*$M = \Reals$, $S = (0, 1)$, for which no point $p \not\in S$ has a "closest point";

*$M = \Reals^{2}$, $S$ the polar graph $r = 1 + e^{\theta}$ (which accumulates on from the outside the unit circle), and $p$ a point in the open unit disk.
Finally, it's easy to check that if $q$ is a point of $S$ that is closest to $p$, then every minimizing geodesic from $q$ to $p$ is perpendicular to the tangent space $T_{q}S$ at $q$. As in elementary calculus, however, there can exist critical points of $d(p, \cdot)$ on $S$ that are not minima.
