Let x_0 ∈ R. For every δ > 0, (x_0 - δ , x_0 + δ) contains infinitely many rationals and infinitely many irrationals (because the rationals and the irrationals are dense in R). Therefore, if x_0 is rational, we can take an irrational x_1 in (x_0 - δ , x_0 + δ) to get
|f(x_1) - f(x_0)| = |1 - (-1)| = 2
and if x_0 is irrational, we can take a rational x_2 in (x_0 - δ , x_0 + δ) to get
|f(x_2) - f(x_0)| = |-1 - 1| = 2
Hence, for every δ > 0, we can find an u in (x_0 - δ , x_0 + δ) such that
|f(u) - f(x_0)| = 2 > 0
which shows f is discontinuous at every real x_0.
This can also be done with sequences:
If x_0 is rational, take a sequence u_n of irrationals that converges to x_0. Then, f(u_n) → 1 ≠ -1 = f(x_0), which shows f is discontinuous at x_0.
If x_0 is irrational, take a sequence vu_n of rationals that converges to x_0. Then, f(v_n) → -1 ≠ 1 = f(x_0), which shows f is discontinuous at x_0.
I like the 1st proof best.