The −NH2 group of aniline is a very strong electron donor (+M effect), hence it activates the benzene ring thoroughly and the electrophilic aromatic substitutions on the benzene ring are very easy to take place at ortho and para-positions.
o-bromination
p-bromination
In addition to the usual resonating structures, that stabilizes the intermediate carbonium ion, the resonating strucutres formed by the interaction of lone pair electrons of nitrogen with the positively charged carbon of the ring also increase the stability of the carbonium ion formed during the atttack of Br+ ion (electrophile) on O− and p-positions.