Well I guess it should be something to do with the fact that $x = x^2$ has solutions $0$ and $1$.
Let $a>1$ be rational, then we can always find an irrational $a' > a$ very close to $a$ such that $|f(a)-f(a')| = |a-a'^2| > a(a-1)$.
You can do the same when $a$ is irrational, then you can do it when $a<0$ and also $0 < a < 1$.
Now we just want to prove continuous at $0$ and $1$. Ill show how for $1$:
We need to show the definition of continuity: $\forall \epsilon > 0,\,\, \exists \delta,\,\, \forall x,\,\, |x-1| < \delta \to |f(x) - f(1)| < \epsilon$
Note by cases that if $x < 1$ or $x > 1$ then $|x^2-1| > |x-1|$ so we can prove continuity by proving the stronger statementn $\forall \epsilon > 0,\,\, \exists \delta,\,\, \forall x,\,\, |x-1| < \delta \to |x^2 - 1| < \epsilon$ and this isn't difficult, just factor $|x^2 - 1^2| = |x-1||x+1|$ the first term is $\delta$ and the second is $2$, so (at least for $x$ relatively close to $1$, which is all that matters) use $\varepsilon = \delta/3$ and the proof goes through.
By the way, $x^2$ repels around 1 but it attracts around 0 so for the proof in the 0 case you can just use $\varepsilon = \delta$.