Sorry if this is an ignorant question. I've been reading a lot about World War 1 and how the Germans had sieged control of most of Belgium at one point for example. What did it physically/governmentally mean for a country to take control of another city? Is it just declared after some amount of fighting? I'm not totally sure I understand how this happens.
Cities could be surrendered by the local goverments, by the national government as part of a complete surrender of the nation (such as Paris' occupation after France's surrender), entirely abandoned by any civilian/military presence, or just by the enemy force getting enough soldiers with enough guns into the area that no one questions who controls that area.
What happened governmentally heavily depended on how the area was captured, the attitudes of the occupiers for the local population, and the position of the city itself.
For example, Denmark was occupied by Germany in WW2. However, the Germans were very respectful of the population, and many of Denmarks civillain institutions were allowed to function, under German "guidance." Denmark was still a nation with a government, but a government that had to comply with the German's wishes.
On the other end of the spectrum, the populations of Poland and other Eastern European areas had their possessions looted and were forced to work at gunpoint. 21% of Polands population died during the war. At the outset, Poland was placed under the General Government, a completely Nazi run instittuion, staffed entirely by Germans, who took over the administrative government functions of Poland entirely.
In the war, sometimes the occupying force would only have a shadow guard of soldiers around to keep the peace and act as police, particularly if the occupied area was far from the front lines. A civilian occupation administration, some kind of temporary government made up of administrators from the occupiers government, would be set up to try to keep the populace at least tolerant of the occupation and let life be as is.
However, if the area was close to the front lines, such as the French villages the Germans captured in WW1, the areas would be governmentally run directly by the military to protect vital supply lines, protect against espinoge, and prevent civilian resistance.
Of course, even if you lived in a "nicer" occupied area, your freedoms were restricted, your right to move was heavily curtailed, there were curfews, restrictions on your mail, and soldiers who may decide to take advantage of their position of power. Also, the civilian population would almost entirely be dependant on the occupiers for food, water, and other necessities, so if the occupiers were running low, the occupied would suffer.
While this is a bit out of the timeframe you asked, here are (propoganda and kinda racist) videos detailing the job of the US soldiers occupying Germany and Japan