I learned about this in school.
The Milgram experiment(s) on obedience to authority figures was a series of social psychology experiments conducted by Yale University psychologist Stanley Milgram. They measured the willingness of study participants, people from a diverse range of occupations with varying levels of education, to obey an authority figure who instructed them to perform acts conflicting with their personal conscience. Participants were led to believe that they were assisting an unrelated experiment, in which they had to administer electric shocks to a "learner". These fake electric shocks gradually increased to levels that would have been fatal had they been real.
The experiment found, unexpectedly, that a very high proportion of subjects would fully obey the instructions, albeit reluctantly.
Sadly, what we are seeing in society is so many people blindly follow orders. Think of every hospital!
What Milgram did not predict was that there would be a large number of people with moral compasses and reason who will RESIST!
Two things I want to add:
There were no direct orders. The authority figures never said "Do it!", they said "It's imperative that the experiment continues" and stuff like that.
Some scientists didn't believe the results, so they repeated the experiment with a puppy and real electricity. Result: 50% of men and 100% of women pressed the button.