I was told by a mechanic that the electrical systems in automobiles have the ability to perform load shedding where non-essential components are turned off when the power demand exceeds what the alternator is able to provide. If this is true how does load shedding work in an automobile's electrical system?
Although this isn't exactly what you described, modern cars reduce the alternator voltage when decelerating by engine braking, meaning the electrical systems of the car are actually powered entirely by the battery, not by the alternator. This type of system is usually called micro hybrid system. A mild hybrid would also allow turning off the engine entirely at speed when power is not needed.
Also, during heavy acceleration, it is possible to turn off the air conditioning compressor, meaning you get a bit extra acceleration.
Could any of these two features be what the mechanic described to you?
I don't think any electrical loads are turned off when driving, they are just switched from the alternator to the battery.
I don't think systems are turned off - the idea that the car can switch off the lights as you go into an icy corner on a dark night just to save power does not gel... The mechanic may not have explained what was meant very well...
But the alternator with the ecu can have its output modulated over and above just controlling the charge needed by the battery - this does depend on the car though.