Near-rings: why are ideals defined like that? While I am learning the very basics of Near-rings ,I have come across the following statement: 
   " a subgroup I of N is an ideal  iff  $$n \equiv m \pmod I$$ and $$x \equiv y \pmod I$$ 
implies  $$n+x \equiv m+y \pmod I$$  and $$n.x \equiv m.y \pmod I$$ 
Here, ($N$,+,.) a near-ring, $n,m,x,y$ are elements in $N$.
 Can anyone  explain me the whole idea of these congruences?
One more thing I need to know is "Do these elements belong to the ideal just like in case of the rings?"
 A: Though not familiar with near-rings I will try to answer. 
Congruences
can be described as equivalence relations on structures like groups,
semigroups, monoids, rings et cetera, that respect these structures.
For instance if $C$ denotes a congruence on semigroup $S$ then $aCa'\wedge bCb'$
implies that $abCa'b'$. This is what I mean by respecting the structure. A quotient is then induced as a new semigroup.
Elements are equivalence classes and the original structure on $S$
gives rise to a sortlike structure on the quotient. In many cases
there is a special equivalence class that is determining in the sense that there is a one-to-one relation between the congruences and these special equivalence classes. 
The focus is then very much on these - somehow congruence representing - classes (normal subgroups in groups,
ideals in rings). The word ideal is used in your question which is
a strong indication that this will also be the case for near- rings. The conditions that you mention in your question then tell us that the equivalence relation indeed respects the structure of the near-ring.
