A city is central to any great civilisation, and as such, cannot be plonked down just anywhere on a map, and expect participants encountering it to feel the city is believable. A good deal of thought and preparatory work has to go into creating a settlement of any real size, that feels fleshed out enough to be real.
The first cities
A civilisation first starts out as nomadic. The first people roam around the land in search of food and water for themselves. The very basics of survival. Later they search for food and water for themselves, and any animals they had domesticated.
Eventually, some of them learn how to grow crops for food. Crops provide a steady, reliable source of foodstuff, compared to hunter/gathering. Unfortunately, it is impossible to be nomadic with crops. Groups begin to settle on land they can farm. This typically means fertile land near lakes or rivers, for a source of fresh water.
It should be noted here, that it does not matter if the species is surface dwelling, or subterranean; the process is the same. For underwater species, subtract the near fresh water part.
As settlements grow, they begin to encroach on one-another's territory. Over time villages that are more successful merge with and swallow villages that are just as successful or less so. This creates a sprawling mass of habitation that requires some form of cohesive government.
A town is born.
Growing a City
A city is far more than just a large town. It is the most important place for those who live in the city, and for those who live in the towns and villages around it. This importance cannot be granted arbitrarily; there must be a reason why it is so venerated.
Cities grow up very slowly over long periods of time. Whenever they grow it is because they are acting as a focal point to attract people. The focal point is not the city itself, but something in the area that made settling there desirable. In later city development, the focal point may be the city itself, but this comes long after settlement has become established. Such secondary focal points include being religious capitals, or governmental capitals.
In the physical world, in European cities, they used to only be called cities, if they had a bishop and a cathedral, for example. A city could be only 20,000 people and still be a city. Where as, a large town with 800,000 but no cathedral, was just a town. The city was a centre of religious power.
The reason for slow growth is that cities start out as sporadic settlements near the focal point. If people are attracted to the point anyway, then entrepreneurs start to set up shops and services near the locale. They require housing for themselves, and housing for employees, for guests. Once a permanent village has formed, and an influx of travellers is still coming, services are set up for those in permanent residence, and the whole thing grows organically from there.
So What is a Focal Point?
A focal point can be one of any number of reasons to have people marching either to, or past a given location over an extremely long period of time.
Some cities grow up close to rivers, as stated previously. This allows trade ships easy navigation to other cities - before motorised transport; boats are able to move large bulks of goods far faster and cheaper than land based caravans for the same distance.
When the first traders and travellers come to an unsettled river, they look for a way to cross it. If there is a shallow stretch or ford, that is enough to be able to splash through. If the river is narrow enough, a wooden or bone bridge can be lashed together at that shallow point. Over time the bridges become focal points for travellers passing through.
Other cities grow up around natural harbours, carved by nature such as to provide a safe port to shelter from stormy seas. Trade follows later, as ship crews work out they can exchange goods and services whilst sheltering from the storms, and a settlement begins to form.
In a natural harbour, the water has to be deep so the ships can navigate safely, and the land hooked round, preferably hilly even on the part extending into the sea, to protect the ships from any wind.
If you are concerned about being attacked, or if you are being attacked, it is better to be on high ground looking down on the enemy, than it is to be on low ground looking up. High ground can see the enemy coming, gauge their numbers, and have them fight uphill. It is for this reason many cities are built on hills or mountain slopes.
Sometimes there are natural predators, or stinging insects spreading plague, which cannot tolerate the way the weather changes with altitude. Cities may be formed just above the cut-off line where it is safe.
A city grows up anywhere there is work to be done and profit to be made. They will form near any large mine that does not peter out over a substantial period of time. Mountain cities cut terraces into the rock, to grow crops on, keeping them close by if they have a precious commodity such as jewel stones mined there.
Cities would not work if each were capable of producing everything its citizenry needed: You would never have call for more than one city. In actuality what happens is where ever a city is formed, it invariably is able to produce one or more precious commodities, but finds itself lacking on one, or several more. Trade forms.
In many cases, the precious commodity the city has, is actually a strategic placement on either the only possible trade route for many miles around, or, more commonly, is simply in the best position conductive to trade.