A differentiable function $f:\ {\mathbb R}^n\to {\mathbb R}$ has at each point ${\bf p}$ of its domain a gradient $$\nabla f({\bf p})=\Bigl({\partial f\over\partial x_1},{\partial f\over\partial x_2},\ldots,{\partial f\over\partial x_n} \Bigr)_{\bf p}\ .$$ On the other hand, the directional derivative of $f$ at ${\bf p}$ in direction ${\bf v}$ is given by $$D_{\bf v}f({\bf p}):=\lim_{t\to0}{f({\bf p}+ t{\bf v})-f({\bf p})\over t} =\nabla f({\bf p})\cdot{\bf v}\ .$$ Now the level surface: If $\nabla f({\bf p})\ne{\bf 0}$ then the level set of $f$ through the point ${\bf p}$ is locally a smooth surface $S$. Consider a curve $\gamma:\ t\mapsto {\bf x}(t)$ drawn on $S$ with ${\bf x}(0)={\bf p}$. Then the function $$\phi(t):=f\bigl({\bf x}(t)\bigr)$$ is constant, namely $\equiv f({\bf p})$. It follows that $\phi'(t)\equiv0$. In particular we have by the chain rule $$0=\phi'(0)=\nabla f\bigl({\bf x}(0)\bigr)\cdot {\bf x}'(0)=\nabla f({\bf p})\cdot {\bf x}'(0)\ ,$$ which says that $\nabla f({\bf p})$ is orthogonal to the tangent vector ${\bf x}'(0)$ to $\gamma$ at ${\bf p}$. Since this is true for any level curve $\gamma$ through ${\bf p}$ it follows that the vector $\nabla f({\bf p})$ is orthogonal to the level surface $S$.