Ideals began as imaginary numbers invented to rescue prime factorisation
In some number systems, whole numbers can be broken into primes in more than one way, which wrecks a lot of arithmetic. Ernst Kummer patched the hole by imagining missing factors he called ideal numbers. Richard Dedekind later replaced those phantoms with concrete sets, and ideals became a cornerstone of modern algebra.
The word ideal was meant in the sense of imaginary, like the geometer's points at infinity. In 1876, in the third edition of Dirichlet's lectures on number theory, to which he had added many supplements, Dedekind defined ideals as actual sets of numbers. David Hilbert and especially Emmy Noether then carried the notion into polynomial rings and other commutative rings.
The even numbers show the basic idea. Add or subtract two even numbers and you stay even; multiply an even number by any whole number at all and the result is still even. A subset with those two properties, closed under addition and absorbing multiplication from the whole ring, is an ideal. Among the ordinary integers every ideal is just the multiples of one number, so ideals match up exactly with the non-negative integers.
In richer rings that neat match breaks down, and some properties of integers transfer more naturally to ideals than to individual elements. Prime ideals play the role of prime numbers, the Chinese remainder theorem extends to ideals, and in Dedekind domains, a type of ring central to number theory, ideals regain unique factorisation into primes, which is precisely what Kummer was after.
Ideals also let algebraists build new rings by collapsing an ideal to zero, much as normal subgroups produce quotient groups. The two-sided ideals turn out to be exactly the things sent to zero by ring homomorphisms. And a nonzero ring whose only one-sided ideals are the trivial ones, zero and the whole ring, must be a skew-field, where every nonzero element can be divided by.
Source: Ideal (ring theory)