I feel sorry for these pilots because as a teenager, I had a deep interest in mechanical things, and it was easy to obtain an old car, tear the motor apart, and then put it back together and make it run. That opportunity has become almost nonexistent.
Many pilots acquire rote mechanical knowledge, but they have trouble applying it to practical situations. When a cockpit problem occurs, they may make an assumption that results in an incorrect course of action.
Some years ago the airlines stopped teaching the nuts and bolts of aircraft systems, and I am glad that they did. The complexity of some modern systems had become ludicrous and had no bearing on a pilot's ability to analyze a problem and take corrective action. Today, an airline pilot must know how each system functions, how to deal with component failures, how to interpret each warning light and instrument indication, and how to confirm that the desired action did, in fact, occur when a switch was moved or a control was activated.
To acquire basic mechanical knowledge of the airplane you fly, start with the emergency section of your pilot's operating handbook (POH). Learn everything you can about the systems it mentions.
The electrical system is a good example. What is wrong if the alternator warning light comes on during flight? This light is nothing more than a voltmeter. When it's off, system voltage equals alternator voltage and all is well. When it's on, system voltage equals battery voltage, and the alternator is not supplying power.
The POH will tell you to reduce electrical loads and turn the alternator switch off and then on, but before you do this, be sure to turn the avionics equipment off, because a damaging voltage spike (momentary high voltage) can occur when the alternator is turned on again. The potential for a voltage spike exists because after you turn the alternator on it takes a microsecond before the voltage regulator starts regulating.
If the alternator has failed, must you land immediately? That depends on your situation, but for visual daytime flying the answer is "not necessarily." Battery life is the primary concern. A fully charged 30-amp-hour battery will provide 30 amps for one hour. I would be pessimistic (an important pilot trait), and I would assume that my 30-amp-hour battery is now a 15-amp-hour battery. If the electrical system is drawing seven amps of power, the battery should last about 30 minutes.
On the other hand, imagine that you're flying over a desolate area. In that case, I would turn the battery switch off in order to save the remaining battery power and have it available when I approach a suitable destination. The engine keeps running because it's powered by magnetos, but all electrical items in the airplane are now dead - lights, avionics, turn coordinator, fuel gauges, oil temperature gauge, etc.
Here is an example of where a lack of system knowledge allows the pilot to make an assumption that leads to an incorrect course of action: The alternator has failed, the pilot has reduced electrical loads, but he has flown for almost 30 minutes. Battery life now concerns him, so he turns off the battery switch to save battery power. When he finally approaches a suitable destination, he turns the battery switch back on, but nothing happens. The entire system is dead. With proper knowledge, he would have known that a relay is activated when the battery switch is turned on, but only if enough battery voltage is available. Otherwise, the battery relay will not activate, and the remaining battery power will be unavailable.
As pilots gain experience, they begin to realize the importance of the mechanic who twists the wrenches, and I've never met a mechanic who wasn't interested in furthering a pilot's knowledge of the aircraft. Therefore, if your mechanical knowledge is not up to par, I would strongly suggest that you hire a mechanic and have him or her explain the importance of everything that sits inside your airplane's engine cowling and on your instrument panel. It's an investment that pays enormous dividends when you need them most.