Shunning is an act of socially rejecting someone, and is generally done by a group.
It can be formal, as with a church towards a member felt to be acting against its dogma. It can occur with other communities also. There is avoidance of contact, and turning away from the person -- even to the point of not looking at him or her. Depending on circumstances, this can be very upsetting.