We have the well-known classification of rings satisfying $a^2=a$ (for each element $a$) in terms of Stone spaces, via $X \mapsto C(X,\mathbb{F}_2)$. Similarly, rings satisfying $a^3=a$ are classified by pairs of Stone spaces via $(X,Y) \mapsto C(X,\mathbb{F}_2) \times C(Y,\mathbb{F}_3)$. (This kind of classification works for all rings with $a^n=a$ where $n$ is such that every prime power $q$ with $q-1|n-1$ is a prime number. Do these $n$ have a name?)

How to classify the rings satisfying $a^4=a$ for each element $a$?

They are commutative and embed into some product of copies of $\mathbb{F}_2$ or $\mathbb{F}_4$. A typical example would be $\{f \in C(X,\mathbb{F}_4) : f(E) \subseteq \mathbb{F}_2\}$ for some Stone space $X$ and a closed subset $E$. But because of $\mathrm{Aut}(\mathbb{F}_4)=\mathbb{Z}/2$ there cannot be a purely topological classification.

I suspect that $H^1(X \setminus E,\mathbb{Z}/2)$ might enter here. In fact, if $A$ is a ring satisfying $a^4=a$, then $E:=\{\mathfrak{p} : A/\mathfrak{p} \cong \mathbb{F}_2\}$ is a closed subset of the Stone space $X:=\mathrm{Spec}(A)$ and for every compact open subset $V$ of $X \setminus E$ we have an isomorphism of sheaves $\mathcal{O}_X |_{V} \cong \underline{\mathbb{F}_4}|_V$, basically because $H^1(V,\mathbb{Z}/2)=0$. But the potential failure of $\mathcal{O}_X |_{X \setminus E} \cong \underline{\mathbb{F}_4}|_{X \setminus E}$ should be encoded in $H^1(X \setminus E,\mathbb{Z}/2)$.