The base of the economy in Crusader Kings II are holdings - great medieval castles, temples, trade posts and medieval cities. These are present in each province, or county, and you can build new ones.
Holdings come in 4 types:
Icon
Description
Modifiers
City, managed by mayors
Cities are managed by mayors, who are usually elected and change from time to time. Cities are good for taxes and income, not so much for raising levies.
Castles are great defensive structures, able to raise the most soldiers for your wars, though they are not so good for taxes. Castles are owned by barons or a liege.
All holdings can be upgraded, and follow the focus on what they are already good at. Cities and Churches also have buildings designed to boost research, and cities can build a harbor, more gold and ships, if they are coastal.
If a holding is owned by the wrong type of character, for instance a mayor owning a Castle, a "wrong type" holding penalty is applied, reducing its efficiency.