If a gang member is attacked, attacks another prisoner or starts a riot all other nearby members of his gang will become involved in the fight. When multiple gangs come into contact with each other a fight between both gangs may occur.
On the Intelligence screen there is an option to see every gang member, type of gang, and number of kills per gang.
To add gangs to a prison created before Alpha 34 add EnabledGangs true to each .prison file (above EnabledDecay).
Since Alpha 35, gang members will claim territory around your prison. The areas controlled by the gangs will be marked with the gang color in the gangs screen (in the intelligence menu). All the rival gang members that enter this area will be attacked and even killed, and the prisoners that are not part of a gang will be forced to pay money in order to enter in the gang areas. The gang members will then use the money to buy weapons and other contraband they need.
A gang-controlled area will also affect your management. You can't build or design rooms in the areas controlled by a gang. You will have to evict the gang (through the intelligence screen). If you order an eviction, all the gang members in the area will turn hostile toward your guards and try to defend their territory. If your guards manage to hold a territory for at least 24 hours then the gang members will no longer own that area.
As of the Alpha 35 update gangs can have a leader. For every 10 gang members, the leader will assign a lieutenant. If the gang leader is killed, all the members of that gang will start a riot. The gang members are pretty loyal to their leader, so they also might get angry if their leader is locked up in solitary, or is beaten by the guards, which will increase the danger level of the prison. In escape mode if you kill one of your gangs member you are kicked out of the gang you were in. There is a Captain,lieutenant