OK, so my rather flippant comment aside, avoiding controlled flight into terrain is largely an exercise in common sense (many FAA "Special Emphasis Areas" could be rolled up into a special emphasis on common sense).
It basically boils down to three things:
- Knowing where the terrain / obstacles are.
- Knowing where your aircraft is.
- Ensuring your aircraft doesn't get too close to terrain or obstacles.
So how do we do that?
Charts and Elevation Figures
For many pilots there's a simple and practical way to do this printed right on your VFR sectional chart: The Maximum Elevation Figure (MEF):
The MEF indicates the tallest feature (terrain or obstacle) in a given quadrangle on the sectional. If you are flying with a healthy margin (500-1000 feet or more) between you and the Maximum Elevation Figure you will not hit terrain or obstacles - they will be below you.
The MEF is one reason charts expire: As new obstacles are constructed (buildings, radio towers, etc.) the MEF in each quadrangle will be updated appropriately.
ATC Information (and More Charts)
ATC deals with an altitude which is useful for all pilots to know: Minimum Instrument Altitude (MIA). This altitude provides a guaranteed obstacle/terrain clearance (1,000 feet, or 2,000 feet in designated mountainous areas) for instrument flights.
Operating at or above the Minimum Instrument Altitude for a region gives you similar protections to operating at or above the MEF altitude from the VFR sectional, and also usually ensures that ATC will have radar contact with you.
The Minimum Instrument Altitude (and another useful one, the Minimum Vectoring Altitude) are charted for center and TRACON facilities. Most pilots haven't ever seen these charts (they're "Not For Navigation" and not particularly useful unless you know the ground over which the sectors are drawn), but they are available from the FAA as supplemental information.
Aircraft Performance and Common Sense
Unfortunately some pilots don't have the option of flying over all the terrain they may have to deal with - pilots in mountainous areas have to use mountain passes to cross ridges, and may be flying between peaks that are above their altitude.
It's here that common sense and aircraft performance play into things: You know your aircraft has a given rate of climb given its current altitude and loading, and that terrain is rising at a given slope below you. It is then the pilot's responsibility to ensure that they can out-climb the terrain, and to ensure that there is an "out" (either another pass to divert to or enough room to safely make a 180-degree turn if the terrain is out-climbing the aircraft).
This applies for man-made obstacles as well as terrain - misjudging the turning radius of your aircraft in flight can be fatal if you're relying on that to get you out of trouble.
Common sense dictates that you don't enter a pass (either a canyon/valley or a corridor surrounded by tall buildings) unless you know you can safely fly through or turn around.
Fancy Electronic Tools
Electronic flight planning applications have made terrain avoidance much easier: programs like ForeFlight and Garmin Pilot include "Hazard Advisor" and "Altitude Advisor" functions that will show where your planned route will intersect terrain or obstacles.
Many electronic flight bag / flight planning programs also include limited synthetic vision capabilities, and some glass-cockpit aircraft also include these capabilities. The virtual terrain presentation available using synthetic vision systems can be helpful if flying in IMC or marginal VFR weather: