It varies, obviously, depending on the setting and the style of game we're going for, but most of the time we gravitate to the same system:
Cheap, commonly-used items like potions of cure light wounds are not particularly difficult to find. A decent-sized town might have anywhere from 3 to 10 of them available every week, for example, generally through a local temple or alchemist or other "adventurer-friendly" shop.
More expensive or stranger items are always bought on commission: there are no magic shops with items on the shelves waiting for purchase. Sometimes the commission process is streamlined, as in the player asks the GM if he can find someone to make, say, a wand of cure moderate wounds, and the GM replies, "Yes, and it can be ready in X days for Y price."...where Y is usually a little above market value, depending on how urgent the commission is, how big the town is, how stingy the GM is feeling, and so on.
Sometimes the commission is something that actually gets played out, if the search for someone to build an item is somehow interesting in and of itself, or if it dovetails nicely with something else that's interesting in the game. But if it's just a straightforward "I give you money, you build me an item" exchange with no complications, we don't waste a lot of time on it.
Selling items is generally handled off-camera, along with the selling of other loot, just because no one in our gaming group is all that interested in obsessing over the mercantile side of adventuring. We list off what we want to sell and what the market value is, and the GM occasionally adjusts the actual sale price of a particular item up or down (usually down). The GM also says about how long and how much effort it takes to sell everything, and summarizes the result ("So after four days, you've managed to sell off all the treasure you wanted to..."). It takes maybe ten minutes of game time at the absolute most to square that away, and then we're back to the fun part of the game.
We also completely ignore the "magic items can be sold for half of their market value" rule, because it's obnoxious and doesn't make much sense in the settings we usually play in. I mean, if the market value is not in fact what the item is worth on the market, then what is it supposed to be? And why would a magic item depreciate in value, when many of them are much more durable than common items, much more rare and valuable, and possibly antiques on top of that? And why is it that PCs can never find someone who's trying to unload a magic item at half price? And if there are no magic item retailers who need to keep stock on their shelves, who exactly is getting to buy these items at wholesale prices?
Finally, PCs with item creation feats often take money from other PCs to craft particular items; usually the total price they charge is less than what the NPC crafters are asking, but still high enough that they can turn a useful profit for their time and XP expenditure. PCs crafting items for NPCs happens, too; generally when the PC needs cash to pay for other items or spells and is willing to trade a little time and XP to get it.
--
wizards, in particular, can make good use of crafting profits to re-stock their spellbooks
ryan