We know that cities grow and expand and their populations increase over time, but, what happened when walls surrounding the city become not big enough to fit the ever growing city? Like did they destroy them and build bigger ones instead (which I doubt they had the ability to do so)? Did they leave it and start building outside the walls, and if they did, did they build another bigger wall to surround the previous wall (so it becomes like a city with it's walls inside another city with it's walls)? did they just simply build another city?
Maybe I'm understanding it wrong, like did they have the entire city inside the walls or did the walls only protect the essentials like citizens houses and the rulers palace and the other things like markets and farms were built outside the city outside the city?
Part 1/2
So the answer should be incredibly complex as various city walls have experienced various fates over time. I'm going to assume we mostly want to consider broadly speaking Europe. Now, one important thing to remember is that most pre-modern cities were not bubbling hives of growth, quite contrary, they tended towards a negative natural growth rate, and maintained their size only through constant influx from the countryside which provided a surplus of people who could not find employment in agriculture (the main amongst many reasons to move to the city). This means that there is a certain control of the growth of the town possible and you can more easily remain inside an existing footprint. Disregarding, the more unnatural limiters such as disease and wars.
All of your solutions have been used, sometimes several over time in the same town as needs change over time and geography dictates available options. You could write entire books on the development of even one city's fortifications, which incidentally is part of what I'm referencing here, e.g. Stephen Turnbull; Fortress 025 - The Walls of Constantinople AD 325- 1453 (2004) or Nick Fields; Fortress 071 - The Walls of Rome (2008). I'm not even going to attempt to be comprehensive and thorough (there is simply too much to go through). I am going to go through some examples of various fates of city walls covering most of your questions.
As Constantinople was founded a set of walls were built, tripling the size of the city over it's Greek origin. But these were abandoned and a new even more impressive set was built enclosing a much much larger area, way more than the city needed at that, point but the Romans designed for a new capital. These new walls became the Theodosian walls and would determine the limit of the city until the 15th century. These walls are not what you see today. They toppled in an earthquake 34 years after completion. Though they were quickly rebuilt, and made even more formidable with a triple wall that held out invaders for 1000 years (mostly) and remain today. Now this is massively simplified, we are skipping all the rebuilding, repair, damage etc. over a millennium, give or take. The solution here was build big, bigger than needed and grow into it. Even so there was a district, the Galata built on the other side of the Golden Horn. That's quite common for towns by water actually. After the Ottoman conquest they didn't bother repairing nor maintaining the walls as Istanbul was at the center of a large and powerful empire (by the time Constantinople fell it was an island in the sea of the Ottoman state) and walls had become mostly obsolete by the very siege guns that helped take the city anyway. So Constantinople built walls that were more expansive than needed, expanded again, and then mostly stuck to that until the end of walls (it probably didn't hurt that the Roman empire declined and became more "dispersed" along the way too, not needing nor able to support a massive capital so it didn't grow too big for it's breeches).
I think I would be remiss without bring up the first Rome since I already started with its second later capital. Sometime before the Republic in the 4th century BC the city got it's Servian walls, attributed to king Servius Tullius. These were the walls that kept Hannibal out in the 200s BC. Now Rome expanded beyond these, but just like Constantinople/Istanbul it was now the center of a powerful empire that kept enemies far away from the capital so the walls deteriorated and the city grew beyond them. The 3rd century crisis changed this, and so under emperor Aurelian a massive fortification project was enacted, creating the Aurelian Walls basically encircling a large chunk of the existing settlement. Ironic considering Rome wasn't exactly the seat of government anymore. The area protected by the Aurelian walls is about twice what the Severian wall enclosed. Strategic considerations were made and some of the areas included were important for the water supply and providing the flour the city needed or denying useful areas for attackers like hills. As the new walls were built among existing structures they sometimes included existing features, like tombs and monuments into the construction, which is the reason some of the antique buildings have survived to our days. There's e.g. a small pyramid embedded as part of the walls, the tomb of Cestius. This is also a time when other Roman cities contract into denser more defensive towns we might recognize of the medieaval period. From the time of Maxentius (the guy whom Constantine beat) around 300 AD to the Ostrogoth conquest of the latter 500s Rome had shrunk from 800,00 to maybe 80,000 so the old Aurelian walls were more than enough. In fact at times the problem was more in finding people to man the entirety of it. Now this one is interesting because Rome had another set of "walls" built, in the 1500s after the French invasion brought easily (comparatively) moved artillery to the Italian battlefields Rome started constructing defences in the new style, the one quickly named trace italienne, the low thick bastions that lead into the starfortress style of the 1600s. Since Rome was much reduced in size and well contained by the Aurelian walls they could build the new type of bastion outside it easily. Finances precluded Rome from completing the works all around though. But it serves an important point. Many old medieaval cities had grew only modestly from their beginnings and ancient/medieval walls are relatively easy to expand. You just build a bigger circuit, it's quite interesting (to me at least) that in many cases the first bastion defences could be built around and outside the old medieaval walls of cities. But also, that by the time cities had had some time to fill out their medieaval clothes and we are getting into pre-modern times with a greater increase in populations, there is also a desperate need to replace city defences. So in this case walls were built, became unused and fell into disrepair and largely disappeared. Until circumstances changed, new bigger walls are built, but the general decline again limits the need for expansion, basically already at the time of the creation of new walls. So these walls again become the defining limits of the city into roughly modern times.
End of part 1 and intermission.