In aniline, the nitrogen will donate its lone pair (i.e. two electrons) to form a bond with the ipso carbon of the aromatic ring. The aromaticity of the ring is not disrupted, because this is just a resonance structure, and resonance structures are not accurate representations of the true structure of the molecule. In reality, the lone pair from the nitrogen forms a partial bond with the electrons in the aromatic ring.
So, in short, the nitrogen donates two electrons into the aromatic ring.