Cities can rebel if they have low loyalty. To prevent rebellion, increase loyalty by appointing governors, building loyalty-improving structures, or engaging in diplomacy. Nearby cities and entertainment districts can also help maintain loyalty.