There may be a bit of repetition in my answer, but bear with me.
Invent a proto-city
Think of what the city looks like at a bird's-eye view. Does it have sections - north side/south side, or the "good" side and the shady side? Does it have a main road, or docks, or some "downtown" area? Jot those ideas down. Pick something the city has a lot of, and something the city has very little of. Make a few cities, with descriptions like this:
- large city, lots of animals, very little armor, 4 sections: markets, industrial, docks, upper-class
- medium city, lots of weapons, very little magic, 3 sections: guilds, markets, housing
- huge city, lots of food, very few animals, 5 sections: palace, docks, high class housing, slums maze, downtown shops
As you make these proto-cities, they'll stick in your head. The more you think about a given city, the easier it will be to invent one based on it.
Invent Scenes
As icyfire mentioned, the DMG has a section (pages 112-116) for cities to randomly generate stuff. Read through these lists. Carefully. After you've read through every single option, open up your favorite spreadsheet and copy all the bits of tables you like, leaving out the bits you don't like. If you know how, make the table generate random number itself, so you can create a random scene at the click of a button. If you don't know how, roll dice - it's the same effect, it just takes a few seconds longer.
Then imagine that scene. Think of the sounds, smells, etc. - paint a picture in your head. Write it down. Then, randomly generate another scene, and follow the same process.
After you've done that a dozen times, you'll have a bunch of locations stuck in your head.
Populate a city
Finally, think of three memorable characters for a city - don't worry about stats, just come up with a person. It could be the mayor, or the captain of the city guard, or just a regular guardsman, or a street urchin. Pick a city you invented earlier and make up three characters for it, then do it again for the rest of the dozen.
Put it all together
During the game, as your players enter a city, take a look at the cities you invented, and pick one out - or squash a few together. Remember the cities, scenes, and characters you invented, and use them! The more you use your imagination to create cities, the easier it gets, so practice before you play.
Personally, I use a random generator spreadsheet; I can hit a key, and create a new city instantly. I've created all manner of on-the-fly cities with the following command (which should work in Excel or Google Sheets):
=INDEX(A1:A10, RANDBETWEEN(1,10))
Just columns of city size, trading goods (food, animals, weapons, etc.), sections (slums, markets, etc.), and so foth; then use that command to randomly choose city size, goods it has a lot of, goods it has very little of, what sections it has, and whatever else you choose. Read through it, and let your imagination run wild! Don't like the results? No problem, just refresh it and get a new one! Don't use a computer to game? No problem; randomly generate a city, copy and paste it to a new spreadsheet, and repeat. Print off that spreadsheet when you have enough.
The key is practice, and having a tool to skip the boring generation stuff so you can get to the real flavor!