There are numerous structures that are required in each city, but apartments, hospitals, health clinics, police stations, fire stations, and food shops are more necessary for basic survival and security. The more advanced the civilization, the more specialized these buildings become- with cities requiring schools, universities, museums, etc. In ancient times, before people started building up cities, they lived in small villages where all needs were met by individual houses. These homes needed to be secure against intruders and natural disasters, so they usually had walls around them. They also needed to be comfortable enough for their inhabitants to live in for many years at a time, which is why they often had good heating, cooling, and lighting systems installed inside them. However, as civilizations grew and became more sophisticated, they began to build larger and larger villages until one emerged that was large enough to be called a city. This is when you started seeing buildings such as temples, palaces, libraries, etc. being constructed. In modern times, people again start building up smaller villages, but this time they're called suburbs. The difference between a suburb and a village is that in a suburb there are still houses surrounding a central square, but they're usually smaller than those in a village and less densely populated too. Suburbs tend to grow out of small towns instead of out of nothing like villages do.