The function is discontinuous everywhere, because of the density of the rationals and irrationals within $\mathbb{R}$.
Take $q \in \mathbb{Q}$ and $\varepsilon > 0$. If $f$ were continuous at $q$, then we could find $\delta > 0$ such that
$$
0 < |x-q| < \delta \implies |f(x)-f(q)|=|f(x)-1|<\varepsilon
$$
However, for $\varepsilon = 1/2$ and any $\delta > 0$, we have infinitely many irrationals in $(q-\delta,q+\delta)$, at which $f$ is $0$, and so $|f(x)-f(q)|=1 \not < 1/2$.
Hence, $f$ is discontinuous on the rationals.
A parallel argument follows for the irrationals. Take $r \in \mathbb{R} \setminus \mathbb{Q}$. Then $\forall \delta > 0$, we can find $x$ such that
$$
0 < |x-r| < \delta \text{ but } | f(x) - f(r) | = |f(x)| < \frac 1 2
$$
Namely, this occurs when $x \in \mathbb{Q}$; the density of $\mathbb{Q}$ ensures that $(r-\delta,r+\delta)$ has infinitely many rationals for any $\delta > 0$.
Hence, $f$ is discontinuous on the irrationals too.
It's easy to think of "well, this function is zero everywhere, except where it jumps up at the irrationals" and go "well, it's discontinuous on a set of measure zero."
However, I think the key realization is that it "jumps up and down" far too often. In any interval, you can think of the function as oscillating up and down infinitely many times (though in a discontinuous way, unlike $\sin(1/x)$ as an example).
Alternatively, the realization is simply that just because $f=g$ a.e., doesn't mean that the points of (dis)continuity of $f$ or $g$ have no effect. The nature of those points matters too. After all,
- $f := \chi_{\mathbb{Z}}$ has (countably) infinitely-many discontinuities, but integrating it is totally fine, because the integers are sufficiently spread apart
- $f := \chi_{\mathbb{Q}}$ has (countably) infinitely-many discontinuities, but integrating it (in the Riemann sense) is not fine, since it is discontinuous everywhere
...and so on.