I know the following definitions:
Congruence: $a \equiv b \pmod{n}$ if $n \mid a-b$
A subring $I$ of a ring $R$ is an ideal if whenever $r \in R$ and $a \in I$, then $ar \in I$ and $ra \in I$.
Furthermore, if $a,b \in R$ and $a-b \in I$ then we can write $a \equiv b \pmod{I}$
Ideals seem to deal with congruences in some sense. But what actually differs a ring ideal from a congruence class in the integers?