PPL pilots are taught stall recovery by experiencing it first hand with an instructor.
Do airline pilots intentionally stall an aircraft during training? Or is it all simulator practice because it's too risky?
In 727 and 747-100/200 aircraft and their simulators for the two airlines I flew those aircraft for up to my retirement in 1999, all stall training was done in simulators, never in the actual aircraft.
Stall training in the sim consisted of slowing (or otherwise loading up the wing) until the stick shaker started. Recovery was accomplished by unloading the wing and then adding power in that order. Whether unloading the wing was accomplished by just relaxing back pressure or by positive forward movement of the control column (or by rolling out of a bank if you were in one) was a judgement call.
Typically the sim instructor wanted a significant stick shaker warning, not just a quick blip that you immediately stopped. Also, it was considered bad form if, once you stopped the stick shaker, it started again. Obviously that meant you had loaded up the wing again and were moving toward a secondary stall, which was a definite no-no. As I remember, that was more likely to happen if you made the mistake of leading with power rather than first reducing the angle of attack.
Every once in awhile someone would want to play a bit and see how the sim reacted to a full stall. As I remember, the sim would just bounce around with a very high sink rate. I never felt its response to a full stall was at all representative of what the actual airplane would do.
I experienced the stick shaker in flight in a 747 three times that I remember: once during a test flight in which that was part of the testing, once with a check airman who liked to play, and once on the line.
The instance on the line was when I was still an f.o., and it was the captain's leg. He had extended the speed brakes for the descent. When he brought the power up for the final approach, he forgot about the speed brakes. The stick shaker came on immediately. He realized what he had done, and retracted them, and the stick shaker stopped.
Usually, training is done in a simulator. Not only are the training maneuvers dangerous, but just from an economic perspective, the time in a simulator is cheaper than putting time on a real aircraft, especially for larger types.
Also, stalls are not always covered in regular training for airline pilots. Simulators do not always accurately model a plane's behavior in this situation. When properly flown, airliners should not be in danger of stalling. There are also numerous warnings, and the Airbus fly-by-wire system has an alpha floor protection feature that will automatically increase the engine power if the aircraft gets close to stalling.
However, accidents have shown that even an Airbus can stall, and pilot error has led to multiple cases of airliners stalling and crashing. The result is that pilot training is being changed to include better training for these situations. This takes time though and whether pilots currently get better training depends on the airline.