Answer
$f$ is differentiable on $\mathbb R$.
Work Step by Step
Find the first derivative of $f$.
if $x \leq 1$ it follows that:
$$f(x)=|x-1|^{2}=(-(x-1))^{2}=(x-1)^{2}$$
$$f'(x)=2(x-1)$$
if $x \geq 1$ it follows that:
$$f(x)=|x-1|^{2}=(x-1)^{2}$$
$$f'(x)=2(x-1)$$
Therefore, for all $x \in \mathbb R$, $f'(x)=2(x-1)$ and since all linear functions are differentiable on $\mathbb R$ it follows that $f$ is differentiable on $\mathbb R$.