There are eight ways to stop civil disorder:
1. Build a military unit for martial law. Does not work in Republic or Democracy. Works twice as well in Communism.
2. Build a happiness inducing city improvement or wonder. Remember that Courthouse gives you an extra happy citizen under democracy. This is more useful in initiating celebrations, but if you have unhappiness due to units away from the city an extra happy citizen may get you back in balance.
3. Hire Elvis. Hiring an entertainer to provide 2 luxuries (cups) in the rioting city. This one is great if you have just on or two (or more in a really large empire) troublesome cities. If you are having widespread problems, a more systemic solution is called for. Also remember that specialists (Elvis, Taxman, Scientists) have no happiness factor of their own. If the riot is just because you have one too many citizens, it may work just as well to hire a taxman or scientist as it does to hire Elvis. This is also a lot less wasteful.
4. Raise your luxury rate. Unless you are playing deity+ levels this should almost never be done until after you leave monarchy. Remember that a city can never benefit from more than 2 x population units of luxury (cups) no matter how many are being generated.
5. Change you government. Fundamentalism has no unhappiness, so it always stops the rioting. If you have too many units outside your cities in Democracy, switching to Commie, Fundy or even Republic may be a solution. If you are getting riots in a large, widespread Republic, switching to Democracy may help by getting you back all trade being lost to corruption.
6. Get more trade for the city. This can be done one of three ways. Set up a new or better trade route or move your workers around to get them on better trade producing tiles. Also, you can reduce trade lost to curruption by building a courthouse. All this assumes that you are using luxuries to control happiness.
7. Reduce unhappiness from units in the field. If you are in Republic or Democracy, riots can be caused by having too many units outside your cities. If you do not want to change governments or raise luxuries, move some military units (attack>zero) back to your cities or just disband them.
8. Build a settler. If you have just one too many unhappy citizens in a city, its rioting can be stopped by building a settler and reducing the city's population by one. However, remember that if the unhappiness is due to units in the field (in Rep/Dem), their number will usually stay the same regardless of the number of total citizens. (see below)
One final thing is to always take into account the order in which happiness effects are applied to a city. First, the citizens have their "base" happiness. At deity level only the first citizen in each city is "born" content. All other are born discontent (red). At each lower level, one extra citizen is "born" content.
The second effect is that of luxuries. They work from left to right moving each citizen from whatever their natural state is to happy (bright blue). Each change of state take two cups, so you need four cups to go from unhappy to happy. Due to a quirk in the game, sometimes angry (double unhappy, black) citizens go directly to happy with the application of just two cups.
The third effect is that of city improvements. Note that Mike's Chapel gives the effect of a cathedral in each city and is considered at this time. Also note that a city improvement makes only half as many black or double unhappy citizens content as it does regular (red) unhappy citizens. Improvements work from left to right starting with the first citizen who is not already happy or content.
The fourth effect is that of units in the field. This creates one or two unhappy citizens per unit (depends on government and presence/absence of a police station or women's suffrage) starting with the last (rightmost) happy or content citizen and moving from right to left. Notice that this means that units in the field can undo some or all of your happy/content citizens unhappy no matter how many luxuries or improvements you have. But it does also mean that it leaves your happy citizens alone until all of your content people are unhappy, so you can balance some units in the field with happiness from luxuries. Women's Suffrage reduces the effect of units in the field and takes effect during this phase.
The fifth and final effect is that Wonders. As noted, Mike's is handled in the improvements phase as is oracle (doubles effect or temples). So two of the wonders which take effect at this phase are Hanging Gardens and Cure for Cancer. These will locate the earliest (furthest to the left) citizen which is not already happy and make that citizen happy regardless of his beginning state. Shakespeare's Theater makes content every citizen who is not already happy or content. Finally, J.S. Bach's makes two citizens content working from left to right, just like an improvement.
Note that Shake's and Bach's are the only thing in the game which can turn citizens discontent from units in the field content. Police stations/women's suffrage reduces the effect, but only those two wonders eliminate those particular red faces when they appear.
It helps to look at the happiness state of each city each turn and to keep track of which cities are going to grow. That way, you can anticipate which cities are going to have a new, discontent citizen and take action to prevent that citizen from causing a riot before it starts. This will improve your empire's performance dramatically by avoiding turns wasted in disorder. A similar process can help you keep celebrations going when new citizens begin to appear.
A last bit of advice, as if this post is not way to long already, remember that the extra unhappiness from having too many cities moves from city to city. I treat it as being random, but it may not be. The important thing is that when you have more than the prescribed number of cities for your government type, any city which is exactly balanced (same number of happy and unhappy citizens) is in danger of rioting if it picks up the extra unhappiness, so it may be worth having a surplus happy citizen in cities not afflicted by the extra unhappiness.