Instructions
Print out or hand-draw any overall maps of the city or maps of specific sections of the city that the characters will be spending most of their time in before the game starts. If there are sections of the map that you need to mark for special locations or events but don't want your players to know about, use symbols or numbers and have a "cheat sheet" with they symbol key.
Break down the overall city into smaller districts that have similar locations or people, so that the characters have a general idea of where they would need to go to find a specific type of person, item, or service. Most of the merchants would probably be gathered together in the same area, while the nobles and idle rich will be in a very different location than the peasants and beggars.
Prepare full statistics for specific types of people and have them ready just in case the players attempt to interact with someone that you didn't expect them to. While you won't need hundreds of random stat blocks, it's a good rule of thumb to have one for each of the major type of non-player character the party is likely to encounter, such as one for a merchant, a noble, a commoner, a town guard, a mercenary, an innkeeper, and so on.
Flesh out the major non-player characters and come up with their back stories, alignments, and general habits. In an urban campaign the people that the players meet will be much more important than in a hack-and-slash session, so you should be prepared to properly role-play out how any given person would act when the players speak with them.
Design the basic structure and come up with the important members of the major power groups in the city that the player's will be spending their time in. Every town should at the least have some sort of town guard or militia along with a governing body of some kind, even if it's just a single mayor or elder. Most towns will also have other organizations that can exert influence, such as a thieves guild, merchant association, wizards cabal, and temples of various deities.
Allow the players to build a reputation within the city, whether it is good or bad, as they spend more time there. Other people in the city should mention their actions or possibly recognize them by sight. If they have saved the city from a rampaging dragon or an invading force of githyanki knights then they could be hailed as heroes, but if they are known as the town drunks and have been imprisoned repeatedly for stealing, then they could become the city's dirty little secret that no one wants to let out.
Set aside some time during the adventure for brief forays out of the city or into different sections of the city that they player's wouldn't normally have a cause to go to. A campaign can become boring for the players without variety to spice things up, so add in a reason for the characters to explore the nearby wilderness, make a trek to a different town for supplies, investigate the strange sounds coming from the sewers, or perhaps even meet with the local baron in his castle.
Craft a strong adventure hook that will keep the action centered on the city, if you are making your own adventure rather than using a pre-printed one. The players should never be questioning why they are staying in the city, as the pace of the adventure should keep them flowing from one point of interest to another within the confines of the town.