Good questions! We have to consider that they are insecure for some reason, and putting others down or not caring about others is their way to mask it?
As with any behavior by others, the best way to build up a shield so it doesn't affect how you feel and act, is to realize that it really is all about them, and doesn't affect who we are or what we know or what we do in reality. Therefore, it "shouldn't" (ooo did I really say shouldn't?) cause us to feel differently or poorly about ourselves.
It's really easy to withstand such acting out when we do realize it has nothing to do with us. The more you limit their ability to affect you, the easier it becomes.
It is important to not become callous, so that we never consider what others say to us, balancing good advice with any such "catty" behavior.

I hope this helped you. Some people really do act poorly, sadly. But maybe that's the best they can do?
TC!