IN MILGRAM'S experiment, participants believed they were engaged in a learning experiment. Assigned the role of 'teacher' they were told to administer an electric shock every time the 'learner' (a colleague of the experimenter, but passed off as a volunteer) got an item wrong in paired memory recall.
The real focus of the experiment was to see how far people were willing to go against their conscience in administering pain. Conscience was set against 'obedience' to the increasingly severe demands of the experimenter. Over 60% complied with the most extreme level of punishment although, of course, there was no electric shock.
The reason for the experiment was to explore Nazi criminals' claims that they were only acting on orders when engaging in horrific torture. Milgram's experiment helped to show that this could be true. We are programmed to be obedient to authority figures.