The social group to which a person belongs is called the ingroup, and the social group to which a person does not belong is called the outgroup. Ingroup is a group where you feel safe by cooperating with someone who behave or look just like you. Usually people enters this group to protect from themselves from someone (outgroup) who can do them harm. To avoid ingroup-outgroup bias you should try to put yourself in the role of the person from other group to understand why he behaves like that.