Milgram "randomly" gave out the role of the learner to his confederate and the role of the teacher to the participant. They were then told what they would have to do during the experiment.
The teacher gave fake shocks to the learner that he though was real. There were 30 levels ranging from 15V to 450V. The teacher was deemed obedient if he gave the max shock 3 times. The confederate was recorded before and a tape was played- the teacher couldn't see the learner through the one way mirror.
The participant believed that the learner had died after 330V so afterwards, the teacher was introduced to the learner to show he was not dead. The participant was also fully debriefed on the experiment, learning that the test was not about memory but actually about obedience.65% of participants were obedient.