If your enemy is looking for you, then you can't hide. He'll find you eventually. Because of this, your first concern should be:
If your enemy doesn't know your city exists, he won't look for it. And if he does find it, it will be by accident. Your enemy will not be prepared to fight, and therefore can be eliminated quite easily by your troops, even if they're not trained soldiers, as long as they're equipped for the task.
Of course, you don't have to kill the enemy. You can simply keep them imprisoned or somehow coerce them into staying with you. Naturally, this opens up the possibility of a traitor or spy hiding amongst your "immigrants", but can also make for a great introduction to your city and people. By introducing an outsider, you can explain the way your society works in a natural way.
Of course, secrecy can not be kept indefinitely. Eventually rumors will pop up and your enemy will send out scouts. With a little bit of luck, one of those scouts will return with the Holy Grail, Excalibur, water from the Fountain of Youth, etc.
With people coming and leaving, you'll need to make sure the enemy doesn't follow them back to the city, but how?
Now that your enemy knows you're there... somewhere, you won't be able to cover your tracks. Well, don't do it then! Start building roads, lots of them. If your roads connect two or more cities, leading right in front of yours on the way, who'd think to look there of all places to find the rumored Hidden City? That would be too obvious! The Hidden City must be hidden somewhere in the forest to the north, it can't possibly be on the roadside.
To further throw your enemies off, add fuel to the fire. Now that your city is the subject of rumors, let's create more rumors!
- The Hidden City is inhabited by forest fairies.
- Its entrance only appears during the night.
- It is guarded by two ferocious humanoid wolves.
And so on. Anything to make your enemy believe your city can't possibly be hidden in plain sight. If you're good at it, the rumors will spin out of control and might appear so ridiculous, that people will stop believing in them. And if people don't believe in this obviously ludicrous Hidden City, then they'll eventually stop looking for it altogether.
Additionally, your citizens could easily travel to one city or another without attracting much attention. The people from City A will think they're from City B, and vice versa. The more cities your roads connect, the more difficult it will be to guess who these travelers are really from.
This leaves us to the question: How do we hide that city from all the travelers and merchants who will use your roads, and how can we ensure nobody accidentally stumbles upon your city?
This part depends a lot on where the entrance to your city lies. If it's a cave by the mountains, you could use a boulder as a gate using your magic. A boulder in front of some rocky cliff would be as out-of-place as a tree in a forest; that is, not at all. If the entrance is a hole in the ground, you could bury it, then unbury it whenever someone needs to go in or out.
Of course, the above methods assume you have mages stationed at the entrance who can open or close it fast enough for it to be practical. For a non-magical yet still practical solution you could use bushes to cover the entrance. This can be used easily without magic, but might require periodic maintenance. You wouldn't want the bush to suddenly dry up and/or die out, leaving your entrance plain for everyone to see, would you?
Of course, you can't allow the kids to go outside. Unlike adults, they're more likely to catch attention. What are kids doing in the middle of nowhere? Are they travelling between two cities by themselves, without their parents or any other adult? Suspicious...
They're also much less cautious, and might lead strangers into your city, knowingly or unknowingly. Maybe they'll mess up with your Guardian Bush, breaking off a few twigs here and there. We can't have that. The kids must learn to behave!
And the animals are going to pose a problem too. If you're lucky, you'll have a pasture surrounded by mountains, and the only way to access it — aside from wandering the frozen peaks — would be through the tunnels of your city. Outsiders discovering that pasture would be very unlikely.
Unfortunately, life isn't as easy as that. You'll have to keep your herd and cattle outside, in an unprotected pasture. This would inevitably lead to the question: whose cattle is this? And of course, there's the predators and the eventuality of raids. You'll have to protect them somehow, and that could easily jeopardize the hidden nature of your city. It might be best for your people to change their eating habits. No need to worry, though. You don't need pastures to raise pigs or chickens. I hope your people like bacon & eggs.
Finally, what would be the biggest threat to your city? People. Many of them.
The more people leave or enter the city at once, the greater the risk that someone will notice it. You'll have to ensure that doesn't happen. Also, if your people want to assemble, they'll have to do it within the city, or reasonably far away from the entrance.
If you can, you should also try and redirect the river to flow through your city. It'd be best to avoid having people leave and enter if possible. If they can get their water directly from within the city, don't have them pointlessly exit and reenter to do it.