What happens when a small aircraft like Cessna is flying in daytime then night hits and its now pitch black with zero visibility? How does he not run into mountains and the like?
Lets attack this from a few different angles.
then night hits and its now pitch black with zero visibility?
There is plenty of visibility at night, a clear night is just as nice as a clear day. As a matter of fact when the air cools at night and clouds roll out you can some times see farther than you can during the day.
(photo credit to my girlfriend who was bravely sitting in the back)
As you can see you can still make out the horizon and plently of land marks. While it may be different during the day you can still fly VFR at night.
Zero visibility during the day is the same as zero visibility at night and as mentioned in the comments will require you to fly IFR if you want to fly.,
How does he not run into mountains and the like?
Not flying into the side of a mountain is a topic of its own. You should check out my answer here to that very question.
From a more general stand point there are lots of ways to navigate in an aircraft. Here is a solid answer that covers most of them. The only thing that is not really feasible in a small single pilot aircraft if you are solo is celestial navigation although it could be done.
First, let's get the obvious answer out of the way: the aircraft flies fine, it doesn't know it's night. It's the pilot who may have issues with night flying.
It's true that night flying isn't the same as day flying, and some countries require additional training or even an instrument rating for night flight, but in the US (for example) night VFR flight is allowed and night training is included in basic pilot training. VFR at night is still visual flying, and if you can't see where you're going then you need to stay on the ground. Unless perhaps you have an instrument rating, but operating in night IMC in a single-engine, single-pilot aircraft is considered fairly risky by many pilots, especially if it's over rough terrain.
To address a couple of your specific points:
- Night doesn't "hit"; sunset is a well-known and easily planned for event. A pilot's flight planning should never be so poor that night comes as a surprise.
- Night is not "zero visibility". With a full moon and clear skies, you can see a very long way. And unless you're in a remote area, there are usually plenty of lights visible on the ground. On the other hand, it's certainly true that some nights are darker than others, and if you fly into a cloud at night then you will indeed lose all visibility immediately. That's why most countries require some form of instrument training for night flying, even if it's very basic.
- While pilots do occasionally run into mountains, it's also something that they plan to avoid by choosing a good route and altitude. This is also where night training helps, because you learn things like paying attention to lights (including stars) that suddenly disappear: that means something is now between you and the lights, and you need to have a reasonable idea of what it is. A GPS with terrain features can be very useful.
Of course there are some specific challenges to flying at night, and they're addressed in training. There are sensory illusions that only occur at night (or in very poor visibility), like black holes and autokinesis. There's also a tendency to fixate on the largest, most visible light sources and fly towards them even if it takes you off course. And judging height, distance and runway length are all a little different too, which is why pilots who haven't flown at night for some time should always go up with an instructor first, to refresh their memory.
First of all, a day does not transition into a pitch-black night instantly, but gradually. When an airplane is on an altitude of 2000-3000 feet, most of the building structures and hills etc. are not an obstacle anymore and the pilot has a much better visibility.
For flights initiating during daylight and going to night time, there are several things which are considered.
A pilot, most of the time, plans a flight thoroughly. It includes the final destination, duration to that destination, the route, terrain underneath, weather conditions at present and the changes expected, expected traffic and many other things.
For pitch black darkness, pilots are specially trained and are instrument flight rated.
The aircraft have specialized and enhanced equipment which helps the pilot to navigate during such a time. Most of the time, an IFR pilot flying an airplane for night flying has enough help through different instruments in the plane that he does not need to visually be looking outside. Hence the terms IFR vs VFR.