In a nutshell, the Canadian ambassador took in and sheltered six Americans who had escaped the embassy takeover by the Iranians. The CIA and the Canadians worked together to hide the Americans, create Canadian passports, and use disguises to successfully fly the Americans from Tehran to Switzerland and then to the USA. The CIA used the pretext of location scouting for a new movie to get the CIA technical experts into Tehran for the passports and disguises and to remove the experts and the six Americans. Tony Mendez, the CIA disguise expert, had a chapter on this in his book.
Of note, a reporter for a leading Canadian paper figured out what was going on and deliberately did not publish anything until the operation was over, for fear of compromising it.
PS: I forgot to mention that the diplomatic personnel of other countries also assisted. But the key players were the Canadians.