On page 35 in his book Riemannian Geometry, Manfredo do Carmo states the following:
Giving a surface $S \subset \Bbb{R}^{3}$, we have a natural way of measuring the lengths of vectors tangent to $S$, namely: the inner product $\langle v, w\rangle$ of two vectors tangent to $S$ at a point $p$ of $S$ is simply the inner product of these vectors in $\Bbb{R}^{3}$. The way to compute the length of a curve is, by definition, to integrate the length of its velocity vector. The definition $\langle \phantom{X} , \phantom{X}\rangle$ permits us to measure not only the lengths of the curves in $S$ but also the area of domains in $S$, as well as the angle between two curves, and all the other "metric" ideas used in geometry.
I don't understand
(1) what we are integrating
(2) how the lengths of the tangent vectors can be used to define the length of a curve
Can someone address those two points?
Note: I mean, visually, I could imagine stringing a bunch of little arrows together like the pictures of path integral arrows in physics, but I assume nothing like that is going on here. Its not like we are putting tangent vectors tip to tail and summing over their lengths is it?