Whenever we study a new algebraic object like a group or a ring, one of the most useful things to study is the maps between those objects. In group theory, we are interested in homomorphisms between groups. In ring theory, we are interested in homomorphisms between rings. Knowing about the possible homomorphisms from a ring $R$ into other rings can give you a large amount of information about the ring you started with, in exactly the same way that, for example, knowing how a group $G$ acts on different sets (i.e. homomorphisms $G\to S_n$) tells you a lot about $G$. This makes homomorphisms a useful thing to study.
Given a homomorphism of rings
$$\theta: R \to S$$
we have the kernel of this homomorphism
$$\ker\theta = \{r\in R : \theta(r ) = 0\}$$
You can think of the kernel as a measure of how much information about the ring $R$ this homomorphism captures. If $\ker\theta$ is very small, the homomorphism $\theta$ captures a lot of information. If $\ker\theta = \{0\}$, then $\theta$ is injective - i.e. it is an isomorphism onto its image. In this case $\theta$ loses no information. On the other extreme, if $\ker\theta = R$, then the image of $\theta$ is trivial - i.e. $\theta$ loses all information about the original ring $R$ (apart from the fact that it is a ring).
So what about ideals?
In group theory, we are interested in normal subgroups because they correspond exactly to kernels of group homomorphisms. In ring theory, ideals are the analogue of normal subgroups - ideals correspond exactly to kernels of homomorphisms.
Notice that $\ker\theta$ is always an ideal of $R$. It is certainly a subgroup of $R$ (since $\theta$ is a homomorphism of additive groups), and if $x\in\ker \theta$ and $r\in R$, then $$\theta(rx) = \theta(r )\theta(x) = \theta(r )\cdot 0 = 0$$
so $rx\in \ker\theta$. And every ideal is a kernel of a homomorphism: if $I$ is an ideal of $R$, then the homomorphism
$$\theta: R\to R/I\\r\mapsto r+ I$$
has $\ker\theta = I$.
Just like in group theory, we have isomorphism theorems connecting quotient groups and images of homomorphisms - $$R/\ker\theta \cong \mathrm{Im}(\theta)$$
But unlike in group theory, a ring has additional structure that leads us to talking about things like units, zero divisors, prime and maximal ideals.
Example: $\mathbb Z/6\mathbb Z$
First note that if $R$ is any ring and $u\in R$ is a unit (i.e. $\exists v\in R$ such that $uv = 1$), then any ideal $I$ containing $u$ will be the entire ring $R$. This is because if $u\in I$, then $1= uv \in I$, and hence for any $r\in R$, $r = ruv \in R$. So $R\subset I$.
Hence, in our case, we only need to consider ideals containing elements of $\mathbb Z/6\mathbb Z$ which are not units - i.e. $2,3,4\pmod 6$.
Note also that if $I$ is an ideal, then $2 \in I \iff 4 \in I$, since $4 \equiv -2 \pmod 6$, and $2 \in I \iff -2\in I$. Hence we only need to consider ideals containing $2,3\pmod 6$.
Let $I$ be an ideal containing both $2,3\pmod 6$. Then $I$ contains $3-2 = 1$, so by the same argument as above, $I=\mathbb Z/6\mathbb Z$.
This shows us that the only ideals of $\mathbb Z/6\mathbb Z$ are $\{0\}$, $\mathbb Z/6\mathbb Z$, $(2)$ and $(3)$ where $(x)$ means the ideal generated by $x$ - i.e.
$$(x) = \{y \in R: y = rx \text{ for some }r\in R\}$$