Roadways and tracks swell around cities, they proliferate and spread like a thousand veins feeding lifeblood into its gates. Lots of fantasy presents cities as this sort of isolated environment, springing mushroom-like from the plain. The existence of subsidiary towns and tributary villages that surround cities in a network of roads and lanes is a well known and well studied effect; this area is often called the cities' hinterland and is even recognized in medieval law sources as a verity. Communes, that is cities that have been granted special charters making them semi-autonomous rather than the private holdings of an individual nobleman, generally include within their jurisdiction a belt of towns a few miles wide in every direction. These towns feed the city, they bolster its industry, and they provide it with all kinds of goods not available in an urban environment. I can't think of the book off the top of my head, but there's a great economic history of the middle ages that has a series of interesting hexes and algorithms used to predict (and describe) the size and distribution of towns and villages, middling sized cities, and large cities. This system uses as its basis the idea of "breaking and bulking," an economic feature of market centers.
When you stand outside the walls of a medieval city, you are standing on a track that runs all around them, from gate to gate. Sometimes the gate you want to enter is closed or busy or has a tariff on it. This means you'll travel to another one of the many gates, and enough people do this over time that even were it not part of the design feature of the city, this track would be created by the simple action over time of merchants with caravans attempting to find the optimal entry-point.
Spreading out from this ring-shaped track are farms and pasturage, intertwined by tracks and roads that link them together and to the city from which they receive their rights. Much like a fortress, these are the places that will be raided and burned if the city invokes the ire of an enemy or the extension of royal policy calls for war on that particular commune (the War of the Lombard League comes to mind). Beyond these will be found a number of satellite villages that serve the city in much the same way and may be subject to the same types of reprisals by invading armies.
Furthermore, cities grow up on trade routes where major roads cross (or trade crosses from roadway to riverine, or oceanic, or riverine to oceanic, or however it may be). It is rare indeed for a city to be located 'nowhere,' ie, not on the conflux of other trade lines. The algorithm for computing city locations must always be manually bent to take into account the location of the major trade routes—big cities serve as anchor points, and the small villages and medium market towns spread out like pockmarks from this central location, naturally springing up.
To overcome this economic certainty would require major intervention by fantasy factors. The existence of widespread flying trade on the backs of carpets or pegasi, for instance, might justify the presence of a city in a remote mountainside or a historical factor such as the removal of an entire people to a protected mountain-fastness (Machu Picchu, for instance) would provide a less fantastic reasoning. Still, understanding the basic distribution of cities and markets is important so that when you break that reasoning, at least you know why.