Let $S \subset {\Bbb R}^3$ be a (sufficiently) smooth surface, and let $\sigma (t)$, $\tau(t)$ be two smooth curves in $S$. Suppose $\sigma(t)$ and $\tau(t)$ both pass through the point $p \in S$; without loss of generality we can take $\sigma(0) = \tau(0) = p$. Since $\sigma(t)$ and $\tau(t)$ are also curves in $\Bbb R^3$, their tangent vector fields $\sigma'(t)$, $\tau'(t)$ lie in $T \Bbb R^3$, the tangent bundle of $\Bbb R^3$. As such, we can take the inner product of $\sigma'(t)$ and $\tau'(t)$ at any point such as $p$ through which they both pass by exploiting the Euclidean inner product structure $\langle \cdot, \cdot \rangle_{\Bbb R^3}$, viz. by taking for example $\langle \sigma'(0), \tau'(0) \rangle_{\Bbb R^3}$; we can also obtain the magnitudes of these tangent vectors for any value of $t$ in a similar fashion, by taking e.g. $\Vert \sigma'(t) \Vert_{\Bbb R^3} = \sqrt{\langle \sigma'(t), \sigma'(t) \rangle_{\Bbb R^3}}$ with the analogous expression holding for $\tau(t)$. And, having the norms of these tangent vectors, we can in principle compute the lenths if curve segments such as $\sigma(t)$, $t_1 \le t_2$, via the formula
$l(\sigma, t_1, t_2) = \int_{t_1}^{t_2} \Vert \sigma'(t) \Vert_{\Bbb R^3} dt; \tag{1}$
and again, the corresponding formula holds for $\tau(t)$. All these quantities are defined with reference to $\Bbb R^3$, since the all invoke $\langle \cdot, \cdot \rangle_{\Bbb R^3}$ in their definitions, and indeed yield geometrical information about $\sigma(t)$, $\tau(t)$ which in no way requires knowledge of the surface $S$; we merely exploit the fact that $\sigma(t)$, $\tau(t)$ are curves in the ambient space $\Bbb R^3$.
On the other hand, we may also define a tensor field $I: TS \times TS \to \Bbb R$ by taking
$I(\sigma'(0), \tau'(0)) = \langle \sigma'(0), \tau'(0) \rangle_{\Bbb R^3} \tag{2}$
for tangent vectors $\sigma'(0), \tau'(0) \in T_pS$, allowing $p$ to vary over $S$ and adjusting $\sigma(t)$, $\tau(t)$ accordingly so that we always have $\sigma(0) = \tau(0) = p$ while the curves remain in $S$. Such a construction allows the definition of $I$ to be extended to all of $TS$. Once $I$ has been so defined, admittedly in terms of $\langle \cdot, \cdot \rangle_{\Bbb R^3}$, it may be viewed as a tensor field on $S$ without further reference to $\Bbb R^3$; all metric properties of $S$ may now be defined solely in terms of $I$: we have
$\Vert \sigma'(0) \Vert_S = \sqrt{I(\sigma'(0), \sigma'(0))}, \tag{3}$
$l(\sigma, t_1, t_2) = \int_{t_1}^{t_2} \Vert \sigma'(t) \Vert_S dt, \tag{4}$
and we can define an inner product on $TS$ via
$\langle \sigma'(0), \tau'(0) \rangle_S = I(\sigma'(0), \tau'(0)). \tag{5}$
We may now consider $I$ as a structure defined on $TS$ alone. Doing so, we obtain all metric properties of $S$ without need to again refer to $\Bbb R^3$.
Hope this helps. Cheerio,
and as always,
Fiat Lux!!!
What you're looking for is known as a Riemannian metric. One way of phrasing it is as follows. (Lee talks about these later in a slightly different way of phrasing later in his book.)
A Riemannian metric on a smooth manifold $M$ is a choice of inner product $g_p$ on each tangent space $T_pM$ that varies smoothly, in the sense that given any two smooth vector fields $X$ and $Y$ on $M$, the function $g(X,Y) = p \mapsto g_p(X_p,Y_p)$ is smooth.
Now let's start with an embedding $f: M \hookrightarrow \Bbb R^n$. The first fundamental form gives us a Riemannian metric on $M$ by setting $g_p(x,y) = Df(x) \cdot Df(y)$. To see that this is smoothly varying as defined above, consider the maps $TM \to \Bbb R^n \times \Bbb R^n \to \Bbb R^n, (p,v) \mapsto (f(p), Df(v)) \mapsto Df(v)$. Write a smooth vector field $X$ as $p \mapsto (p,X(p))$. Then the map $M \to \Bbb R^n, p \mapsto Df(X(p))$ is smooth, and so is the inner product map $\Bbb R^n \times \Bbb R^n \to \Bbb R, (x,y) \mapsto x\cdot y$. It is readily seen that $g(X,Y) = Df(X(p)) \cdot Df(Y(p))$ and that this latter map is smooth, as desired.
I should also say that a smooth manifold does not automatically come with a Riemannian metric, which is much more structure.
Best Answer
These are just two totally different meanings of the term "metric". In the context of "metric spaces" the word "metric" means one thing, and in the context of Riemannian manifolds it means a different thing (namely, a smoothly varying inner product on the tangent space at each point).
That said, a Riemannian metric on a connected manifold does actually induce a metric in the sense of a distance function. You define the distance between two points as the infimum of the lengths of all smooth curves between them. For a geodesically complete manifold, this infimum is realized by some geodesic, but in general it is not realized. (For instance, in $\mathbb{R}^2\setminus\{0\}$, if you have two points such that $0$ is on the straight line between them, you can connect them by paths that get arbitrarily close to the straight line distance but you cannot realize the straight line distance itself.)