What's the motivation of the ideal? I'm reading a book on Algebra, it introduces the concept of ring after some examples, the concept of ideal.

Definition I.1.8. Let $(A,+,\cdot)$ be a ring and $I$ a non-empty subset of $A$. We say that $I$ is a ideal if:
  
  
*
  
*$x+y\in I,\;\;\;\;\forall \; x,y \in I$
  
*$ax\in I, \;\;\;\;\forall \;x\in I, \;\;\;\;\forall a\in A$
  

I can't understand the motivation of the ideal: The sum of any elements of $I$ are elements of $I$ and the product of any element of $I$ with any element of $A$ is an element of $I$. I'm confused: What's that useful for?
 A: The notion of ideal comes from a generalization of modular arithmetic. It is a refinement (by Dedekind) of Kummer's notion of ideal number, which arose from attempts to prove Fermat's Last Theorem (or some special cases).
When you have a number $n\in {\bf Z}$, then the multiples of $n$ form an ideal in ${\bf Z}$ (a principal ideal denoted by $(n)$ or $n{\bf Z}$). The ring ${\bf Z}_n$ of integers modulo $n$ is then actually the quotient ring ${\bf Z}/n{\bf Z}$. If $p$ is prime, then $p{\bf Z}$ is a prime (even maximal) ideal and ${\bf Z}_p={\bf Z}/p{\bf Z}$ is a domain (even a field).
Similarly, if you have any ring $R$ and an ideal $I\unlhd R$, then $R/I$ makes sense and has a natural ring structure, which is a domain iff $I$ is prime and a field iff $I$ is maximal.
For Dedekind domains, there is a further analogy: if $R$ is a Dedekind domain (for example, the integer subring of a number field), then any nonzero ideal $I\unlhd R$ factors uniquely into a product of prime ideals and nonzero prime ideals are exactly the maximal ideals.
In ${\bf Z}$, this corresponds to the fact that any natural number decomposes uniquely into a product of prime numbers (as ${\bf Z}$ is a principal ideal domain, every ideal is principal).
A: In groups, we have the notion of a normal subgroup.  If $G$ is a group, then we have the result that every normal subgroup $N$ is the kernel of some homomorphism $\phi: G \rightarrow H$.
If $R$ is a ring and $\psi: R \rightarrow S$ is a ring homomorphism, its kernel $I$ will certainly be a subring of $R$, but it will also have the property that if $r \in R$ is any element of the ring and $i \in I$ is any element of the kernel, then $ri$ will have $\phi(ri) = \phi(r)\phi(i) = \phi(r) \cdot 0 = 0$, so $ri$ is also in the kernel.
In short, ideals are the natural substructures arising from homomorphisms.  You can check that you need the ideal property to get a well-defined quotient for the same reason.
A: The motivation is to characterize what subsets of a ring can be the kernel of homomorphisms. 
An equivalent way is to define congruences as for the integers: $x \equiv y \bmod I$ iff $x-y \in I$. Then congruences are compatible with the ring operations iff $I$ is an ideal. Being compatible allows one to define a natural ring structure for the set of equivalence classes $R/I$.
