Torsion of submanifolds Studying curves in the Euclidean three dimensional space, one usually defines the curvature and the torsion of a curve. If I am not missunderstanding the thing, I guess that a curve has zero torision if and only if it is contained in a plane.
The curvature is generalised by the second fundamental form of a submanifold.
What it is the generalisation of the torsion for a sub manifold $N$ of a Riemannian manifold $M$? I would like to preserve the property that the torsion vanishes if and only if the submanifold is contaned in a totally geodesic hypersurface.
My guess, if $N$ is a curve, would be something like $\nabla_vII(v,v)-\nabla_{II(v,v)}v-[v,II(v,v)]$, where $\nabla$ is the Levi-Civita connection, $II$ is the seocond fundamental form, and $v$ is a tangent vector to $N$. This guess is insipired by the other use of the word torsion in Riemanninan geometry, and this is likely to be missleading, in view of the question Relating curvature and torsion of a connection to those of a curve
Probably this material is standard, but the references I found are either about torision of a curve in the Euclidean space (and usually they are very computational), or torsion of a connection.
 A: The torsion of a curve $C$ in $\newcommand{\bR}{\mathbb{R}}$ $\bR^3$ is a a manifestation of two ``freak'' low dimensional accidents: the curve is $1$-dimensional and  it lives in a $3$-dimensional Euclidean space. 
Being $1$-dimensional allows us, after fixing an orientation, to choose an orthonormal basis  of the tangent space $T_pC$ at  each point $p\in C$.  Just fix the arclength parametrization compatible    with the orientation. This allows us to defined the first vector $T(p)$ of the Frenet frame.  
If there is  a bit of curvature, then we can define the 2nd vector $N(p)$ of the Frenet frame.  Since the curve is in $\bR^3$ we can now define the third vector of the Frenet frame $B(p)=T(p)\times N(p)$.
Note that if the curve  lived in a higher dimensional space $\bR^n$, $n>3$, the above process  would  stop after we've defined the normal vector $N(p)$.
For  a submanifold $M$ of dimension $m$ living in an Euclidean space $\bR^N$, $N>m$, the 2nd fundamental form $\DeclareMathOperator{\Gr}{\mathbf{Gr}}$  has an alternate description as  the shape operator, i.e., the differential of the Gauss map $\Gamma: M\to\Gr_m(\bR^N)$ that associates to a point $p\in M$ the tangent space $T_pM$ viewed as an element of the Grassmannian $\Gr_m(\bR^N)$  of $m$-dimensional subspaces of $\bR^m$.  In this sense  the shape operator describes the rate of change  along $M$ of an orthonormal moving tangent frame.
The Frenet equations of a curve   describe a bit more that the shape operator.  They describe the motion  along $C$  of an orthonormal frame of $\bR^3$ which  for some fortunate accident can be chosen more or less canonically.  Thus, I do not  believe there is a natural simple  notion of torsion beyond curves in $\bR^3$.
On the other hand,  given   $M\subset \bR^N$ we can still ask ask if $M$ is contained in an affine subspace of dimension $n<N$.  This corresponds to asking when the image of the Gauss map be contained  in a sub-Grassmannian $\Gr_m(\bR^n)$ but, be careful, there are many ways of  canonically embedding $\Gr_m(\bR^n)$ in $\Gr_m(\bR^N)$.  
In any case, this phenomenon  can be expressed in terms of certain  constraints on the 2nd fundamental form that you could call torsions.   I don't believe they are too useful,  though I could be proven wrong. 
A: For curves in the Euclidean space, you can define "generalized curvatures", see Wikipedia, by applying Gram-Schmidt to the vectors $\gamma', \gamma'',\ldots$. The curvature of order $k$ is defined only if the vectors up to $\gamma^{(k)}$ are linearly independent.
Now, if on a curve arc all curvatures up to $(k-1)$-st are defined and don't vanish, but the $k$-th is defined and vanishes identically (which means there is a linear relation between $\gamma', \ldots, \gamma^{(k+1)}$), then the curve is contained in a $k$-dimensional affine subspace. To see this, consider the projection of $\gamma$ to the orthogonal complement of the span of $\gamma', \ldots, \gamma^{(k)}$ and apply the uniqueness theorem for ODE.
A: CLARIFICATION: The connection $\nabla$ used below is the Levi-Civita connection for the Riemannian metric on $M$ and not $N$.
First, assume that $N$ is a curve
and recall how to construct the Frenet frame of a curve.
Let $e_1 \in T_*N$ be a unit tangent vector along the
curve. If $\nabla_{e_1}e_1 \ne 0$, then, since $e_1\cdot\nabla_{e_1}e_1
= 0$, there isa a unique unit vector $e_2$ and function
$\kappa_1 > 0$ such that $e_2\cdot e_1 = 0$
and $\nabla_{e_1}e_1 = \kappa_{1} e_2$. 
If, in turn, $\nabla_{e_1}e_2 \ne 0$, then, $e_2\cdot \nabla_{e_1}e_2 =
0$ and $e_1\cdot \nabla_{e_1}e_2 = -e_2\cdot\nabla_{e_1}e_1 =
-\kappa_{1}$. Therefore, there exists a unique unit vector $e_3$
and function $\kappa_2 > 0$ such
that $e_3\cdot e_1 = e_3\cdot e_2 = 0$ and
$$
\nabla_{e_1}e_2 = -\kappa_{1} e_1 + \kappa_{2} e_3.
$$
If, at each stage, $\nabla_{e_1}e_k \ne 0$, then this leads to a
uniquely defined orthonormal frame of vectors $e_1, \dots, e_n \in
T_*M$ along $N$, known as the Frenet frame and corresponding functions
$\kappa_1, \dots, \kappa_{n-1}$ such that
$$
\nabla_{e_1}e_k = -\kappa_{k-1}e_{k-1} + \kappa_{k}e_{k+1}.
$$
If $M$ is flat, then the vanishing of $\kappa_{j},
\dots, \kappa_{n-1}$ implies that $N$ lies in an affine subspace of
dimension $j$. The function $\kappa_1$ is usually called the curvature
of $N$, and the functions $\kappa_2, \dots, \kappa_{n-1}$ considered as
torsion functions.
This can be generalized to higher dimensional submanifolds
as described by Liviu. Here is a sketch of one way to do it:
If $n_1 = \dim N$, let $e_1, \dots, e_{n_1}$ be an
orthonormal frame of vectors tangent to $N$. Suppose at each point
in $N$, the vectors $e_1, \dots, e_{n_1},
\nabla_{e_j}e_i$, where $1 \le i, j \le n$, span an $n_2$-dimensional
subspace, where $n < n_2$. Extend the orthonormal frame to a basis $e_1, \dots,
e_{n_2}$ of this larger subspace. The generalization of $\kappa_1$ for a
curve to a higher dimensional submanifold is the second fundamental
form
$H_{ij} = H^\mu_{ij}e_\mu$, where $H^\mu_{ij} =
e_\mu\cdot\nabla_{e_i}e_j$ and $n+1 \le \mu \le n_2$. Now suppose that $e_i, \nabla_{e_j}e_i$,
$1 \le i,j \le n_2$ span an $n_3$-dimensional subspace of
$T_*M$. Again, extend the orthonormal frame to one that spans this
subspace.
Then one can define a torsion tensor $T_{\mu,\nu} = T_{\mu\nu}^\eta
e_\eta$, where $n+1 \le \mu,\nu \le n_2$ and $n_2+1\le \eta \le n_3$.
This process can be continued. If the resulting frame does not span $T_*M$, then
one might call $N$ degenerate. If $M$ is flat, this implies that $N$
lies in an affine subspace. Otherwise, one gets a higher dimensional
version of a Frenet frame. The frame is not unique, but the
the nested sequence of osculating subspaces obtained in this way are.
