Not every prison is like that OZ show, y'know.
As far as the race hating goes, that's true and untrue at the same time. New fish are usually persuaded to join gangs of their color because others manipulate the would-be recruit into thinking that everyone who doesn't look like him is out to get him. And many are threatened to join a gang against their will (such as Latin Kings being forced to join the Mexican Mafia), or out of fear and wants protection.
Getting back to the "everyone who's not your race is out to get you" propaganda, it can turn into truth over time, and it gets ugly. Rumors eventually turn into truth in prison, sadly enough.