In Europa Universalis II, nationalism is a special type of revolt risk for recently conquered or diploannexed cities. There are a few exceptions. Cities in core provinces of their owning country do not experience nationalism, and pagan cities do not get most of the effects. colonies and trading posts never experience nationalism.
Nationalism typically lasts for 30 years. For the first 10 years, nationalism revolt risk is 3%, then 2% for the second 10 years, and 1% for the third 10 years. After these 30 years, there is no further revolt risk from nationalism. The revolt risk from nationalism is like other revolt risks in that they all add to determine the net revolt risk for a city.
Nationalism revolt risk is special in that it also serves as the minimum level of revolt risk for a city. For example, it does not matter how stable the country is, or how well-tolerated a religion is; if a city has 2% nationalism then it must always have at least 2% revolt risk.
Nationalism also prevents culture change from happening in a colonial city. See the culture article for details. Note that pagan cities won't change culture until their 30 years are up, even though their revolt risk from nationalism is zero.
One final effect of nationalism is that when nationalism is still high (at the 3% level), the manpower supplied by a city is reduced.
In some scenarios, certain provinces are coded to have nationalism for more than 30 years from scenario start. (Most notably English-controlled provinces in Ireland in the 1492 scenario.) This is done by placing a conquest date that is later than the actual start-date of the scenario; once the actual date has passed, nationalism reduces as explained here.