How do we take second order of total differential? This is the total differential 
$$df=dx\frac {\partial f}{\partial x}+dy\frac {\partial f}{\partial y}.$$
How do we take higher orders of total differential, $d^2 f=$?
Suppose I have $f(x,y)$ and I want the second order total differential $d^2f$?

I will assume that you are referring to the Fréchet derivative. If $U\subseteq\mathbb{R}^n$ is an open set and we have functions $\omega_{j_1,\dots,j_p}:U\to\mathbb{R}$, then $$
D\left(\sum_{j_1,\dots,j_p} \omega_{j_1,\dots,j_p} dx_{j_1}\otimes\cdots\otimes dx_{j_p}\right) = \sum_{j_1,\dots,j_p}\sum_{j=1}^n \frac{\partial\omega_{j_1,\dots,j_p}}{\partial x_{j}} dx_j\otimes dx_{j_1}\otimes\cdots\otimes dx_{j_p}.
$$
Here $dx_{i}$ is the projection onto the $i$th coordinate, and if $\alpha,\beta$ are multilinear forms then $\alpha\otimes\beta$ is the multilinear form defined by $(\alpha\otimes\beta)(x,y)=\alpha(x)\beta(y)$.
For example, let $f(x,y)=x^3+x^2 y^2+y^3$. Then \begin{align}
Df&=(3x^2+2xy^2)dx+(2x^2y+3y^2)dy; \\
D^2f&=(6x+2y^2)dx\otimes dx+4xy(dx\otimes dy+dy\otimes dx)+(2x^2+6y)dy\otimes dy; \\
D^3f&=6dx\otimes dx\otimes dx+4y(dx\otimes dx\otimes dy+dx\otimes dy\otimes dx+dy\otimes dx\otimes dx)\\
&\qquad+4x(dx\otimes dy\otimes dy+dy\otimes dx\otimes dy+dy\otimes dy\otimes dx) \\
&\qquad+6dy\otimes dy\otimes dy.
\end{align}
Since $D^p f(x)$ is always a symmetric multilinear map if $f$ is of class $C^p$, you might want to simplify the above by using the symmetric product (of tensors).
