I like to have something happening when the PCs arrive in a town. It doesn't have to be anything big, but just something that the whole town is talking about. Maybe some well known adventurers are passing through, perhaps a new temple is being constructed, or maybe the local lord is getting married, anything works really. This way, the characters can get to know something about the town, and it feels more alive. When the PCs notice that not many people are talking, many people are wearing black, and such they might start to inquire and discover that an important religious leader has recently died. Don't tie it to the story or adventure, make it a background detail to give a sense of "things happening."
Then make things like this happen again every once in a while. Maybe in a few sessions the town will be abuzz with rumors that the baroness is pregnant with an heir, people gossiping about whether its going to be a boy or a girl. This can show that life doesn't revolve around the PCs and that life goes on around them.
Anothing thing is to make a place not what it appears at first to be. An old temple might be converted into an orphanage or the old barraks might be a library. When the PCs visit this place, they're faced with a building they would normally skip over. The fighter visiting the barraks looking for work, for example, might be faced with rows of books, and the NPC who is in charge there is very talkative and pulls the
player in.
I like quirky eccentric NPCs. NPCs who do their own thing and play off the PCs in unexpected ways. One memorible NPC I had was a halfing who could never get anyone's name right, had a gambling problem, and was always asking for money - but he was such a nice guy that they always gave him a bit of gold. The PCs never sought him out; he sought them out! Perhaps the stable boy hasn't ever seen a "real" wizard and follows the PC wizard around or maybe he gets a crush on the elvan ranger in the party, following her and then stammering when she asks him what he's doing. After the PCs have grown accustomed to them, maybe later you can use one of them as a plot hook.
Make the town good at something. It can be anything from tapestries to weapons manufacturing to the local hot springs. It could be a gathering place for mercenaries or the greatest brewer of halfing butter-beer on the coast. Maybe a few wizards have set up shop and adventurers come to have their magical equipment enhanced or there's a scribe school where the most elequent handwriting is taught. Give them anything that the people of the town can do or have that noone else does.
Give the town a secret. It doesn't have to be a big dark secret. But, all small towns have the things that the locals know but don't discuss with outsiders. And big cities can hide many things from wererats in the sewers to powers behind the throne. The PCs don't have to stumble onto these things immediately, but they can creep up over time. It's good to know these things early so that you don't end up with inconsistancy later, even if things look inconsistant on the surface at first.
There are many ways to make a town seem more real and important to the PCs. These are but a few of them.
