Think of $r$ as a function of three variables:
$$r(x,y,z)=\sqrt{x^2+y^2+z^2}$$
$r$ is therefore a function from $\mathbb{R}^3$ to $[0,\infty)$.
Now you have a function $f$ defined on $[0,\infty)$, whose range is $\mathbb{R}$, say, and you are looking at the composition $f\circ r$. This function starts in $\mathbb{R}^3$, and ends up in the range of $f$. By a common abuse of notation, you choose to denote this function by $f(r)$, but what it really means is the composition $f\circ r$. If you are going to differentiate it as a function from $\mathbb{R}^3$ to $\mathbb{R}$, you will be relying on the chain rule, which tells you that:
$${\partial (f\circ r)\over\partial x}(x_0,y_0,z_0)=f'(r(x_0,y_0,z_0))\cdot {\partial r\over \partial x}(x_0,y_0,z_0)$$
and by further abuse of notation, this is often denoted as
$${df\over dr}{\partial r\over \partial x}\enspace{\rm{or}}\enspace f'(r){\partial r\over \partial x}$$
In a similar way you obtain the other two partial derivatives. The result is a vector of three components, known as the gradient of $f$, which can be written as $f'(r)\nabla r$, where $\nabla r$ is the gradient of $r$, and $f'(r)$, is a number, both evaluated at the point $(x_0,y_0,z_0)$. So the derivative of $f\circ r$ at the point $(x_0,y_0,z_0)$ is the vector:
$$f'(r(x_0,y_0,z_0))\cdot({\partial r\over \partial x}(x_0,y_0,z_0),{\partial r\over \partial y}(x_0,y_0,z_0),{\partial r\over \partial z}(x_0,y_0,z_0))$$