Let me expand my comment into a slightly more complete answer.
Since $R$ itself is an ideal of $R$, the condition implies that every element of $R$ is idempotent and thus $R$ is a Boolean ring. Now every Boolean ring is commutative and defines a Boolean algebra where $x \wedge y = xy$ and $x \vee y = x + y + xy$ and $\bar x = 1 + x$. Conversely, every Boolean algebra $(B, \vee, \wedge, \overline{})$ defines a Boolean ring by setting $x + y = (x ∨ y) ∧ \overline{(x ∧ y)}$ and $xy = x \wedge y$. Finally, Stone's representation theorem for Boolean algebras gives a complete characterisation of Boolean rings (or Boolean algebras) as a fields of sets. A _fields of sets_ is a Boolean subalgebra of the Boolean algebra $\mathcal{P}(E)$ of all subsets of a given set $E$, equipped with the operations $X \vee Y = X \cup Y$, $X \wedge Y = X \cap Y$ and $\overline{X} = E - X$, the complement of $X$).