The Lagrange function is defined as $\mathcal{L}(q,\dot{q}) = T(q,\dot{q}) - V(q,\dot{q})$ where $T$ defines the kinetic energy and $V$ the potential energy.
The equations of motion are given by $\frac{\partial \mathcal{L}}{\partial q_i} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial \dot{q_i}} = 0$.
In the $n$-body problem we have $n$ planets with masses $m_1, \dots, m_n \in \mathbb{R}_+$. The kinetic and potential energy is given by
$T = \sum_i \frac{1}{2} m_i \Vert \dot{q_i} \Vert_2^2$ and $V = G \cdot \sum_{i<j} \frac{m_i m_j}{\Vert q_i - q_j \Vert_2}$ where $G$ denotes a gravitational constant. Furthermore, $q_i(t) \in \mathbb{R}^3$ decribes the position of the $i$-th planet at time $t$.
Now I need to calculate the equations of motions.
But now I do not understand how to deal with $\frac{\partial \mathcal{L}}{\partial q_i}$. The first thing which confuses me is that $q_i$ is a three-dimensional vector. The second thing would be the derivative of the norm because in calculus we have learned that the norm is not differentiable.
Could anyone explain this problem to me? Any help is really appreciated.
Let's look at the Euler Lagrange equations. You have to be very careful with indices here. The $i$-the particle in your system is represented by the vector $\vec{q}_{i}$. Let's agree to denote the $a$-th component of this vector by $q_{i,a}$. Thus $i$ runs from $1$ to $n$, and $a$ runs from $1$ to $3$. The Euler Lagrange equations now read \begin{equation} \frac{\partial \mathcal{L}}{\partial q_{i,a}} - \frac{d}{dt} \frac{\partial \mathcal{L}}{\partial \dot{q}_{i,a}} = 0. \end{equation} These are actually $3\times n$ equations, one for each combination of $i$ and $a$. Now to rewrite $T$ in a more usefull form. The square norm of $\dot{q}_{i}$ is given by \begin{equation} \|\dot{\vec{q}}_{i}\|^{2} = \sum_{a=1}^{3} \dot{q}_{i,a}^{2}. \end{equation} Substituting this in the expression for $T$ we obtain \begin{equation} T = \frac{1}{2} \sum_{i=1}^{n} \sum_{a = 1}^{3} m_{i}\dot{q}_{i,a}^{2}. \end{equation} A similar rewriting must be done for $V$. It is maybe a bit more complicated, but the idea is the same, so maybe it's good to try it before I explain more.
Now for your second issue, you are right that the norm is non-differentiable at zero. Note that in the expression for $T$ we are not talking about any norms, instead we are talking about the square of the norm, which is perfectly differentiable. In the expression for $V$, the situation is quite dire, we are not just talking about a norm, but even about the function $1/\|\vec{q}_{i} - \vec{q}_{j}\|$, which behaves even more poorly. I tink one simply assumes that $\vec{q}_{i} \neq \vec{q}_{j}$ for $i \neq j$...