Rebellion is a gameplay mechanic in the Total War series.
Empire: Total War[]
Rebellions occur when a region's public order in either class is negative for too long. If it is negative for one turn, workers go on strike (if the lower order is negative) or the nobility write a letter of demands (if the upper order is negative). This has no direct negative effect and is simply a warning. If a region's public order is negative for two turns, then a riot damages a randomly selected building in a region, severely damaging it. Rebellions occur when public order has been negative for three turns, spawning a rebel army that attempts to take the region capital or, failing that, raiding towns in the region they rebelled in. Most regions suffer from large amounts of unrest shortly after being captured, and in larger regions, where resistance to the occupying faction is very high, rebellions (and multiple rebellions) are usually inevitable.
Rebel armies consist of troops that are normally available in the region they spawn in. A minor region with just a government building, for example, spawns only Militia; a region with just a government building and an ordnance factory spawns militia and artillery units. Larger regions spawn larger armies; generally, they are quite small, and don't exceed 6 or 7 regiments. Rebel armies cannot venture out of the region they spawned in.
If a rebel army attacks a capital, then Firelock Armed Citizenry do not spawn to defend it. A rebellion that takes the capital causes the previous occupying faction to lose control of the region. If the region is the home region of any faction, then it declares independence (or, if the faction already exists, it joins that faction). If the region is not a home region to any faction, then it becomes a rebel region that is fair game for invasion for any faction without suffering diplomatic penalties.
If a rebelling army is destroyed, then the area gains a +6 bonus to public order in the form of cracking down on the populace. This bonus diminishes at a rate of one per turn. In this sense deliberately causing a rebellion can be a useful way of improving public order for a short time, useful for suppressing recently conquered regions. If a rebelling army is defeated but not destroyed, it slowly gains more units each turn it remains active.
Preventing rebellions involve garrisoning troops in a region capital, reducing taxes (or exempting it from tax entirely), building cultural and happiness buildings, deleting schools or industrial buildings, having a good justice minister in the cabinet, or any combination of the above. Garrisoning troops, exempting a region from tax and deleting schools yield the fastest results.
Napoleon: Total War[]
Rebellions operate in a similar fashion to Empire. Since troops can now choose to peacefully occupy enemy regions, thereby keeping unrest low, rebellions can be avoided for most regions. However, if a region is looted instead, or if it is a major region that has very high unrest no matter what, then rebellions are usually inevitable.
Rebellions are much more dangerous than they were in Empire. They are much larger, sometimes appearing in multiple armies if the rebellion exceeds twenty regiments. The rebellious units often spawn with multiple chevrons of experience, and almost always come with a varied roster of infantry, artillery, and cavalry--the army composition is not affected by the buildings in the region, so one cannot preemptively weaken the rebelling army by deleting the training centers. However, one unique trait of rebel armies is that they generally do not exceed more than 1 unit of the same type (For example, a rebel army can have multiple Hungarian Fusiliers but not German Fusiliers), so it can vary in difficulty in this regard.
Like in Empire, you can intentionally cause a rebellion and then destroy it to improve public order for the time being, which can be helpful for major regions as the unrest is usually very high. However, this is much more dangerous and tedious than in Empire as the previously mentioned rebel armies are very powerful and can give even normal armies a hard time in defeating them.