Heracles, 2nd century Bc, found at Forum Boarium (Rome). Notice the apple in his hand.
The garden of Hesperides. Greek vessel from 350-340 Bc, found in Paestum.
The golden apples were the property of Hera, who had received them from Gaia as a wedding gift. The goddess had them entrusted to the Hespedies (nymphs) and the dragon Ladon in the far away land of the Hyperboreans (a legendary race of Apollo-worshippers in the far away north, living in some kind of earthly paradise).
The eleventh labour is was one of the more complicated as Heracles didn’t know where to find the apples. The hero travelled the world asking a number of characters where he could find this mysterious land and he managed to end up at Mount Caucasus in the Far East. This so happened to be the mountain that Prometheus was tied to, having his liver eaten by an eagle every day. Heracles killed the eagle. The titan (Prometheus) was so grateful that he wanted to help Heracles; he told the hero not to get the apples himself but to ask Atlas (the titan who carried the skies and the brother of Prometheus) to do it for him and explained how to get Atlas to take on his burden again afterwards.
Heracles at least found his way to the land of the Hyperboreans and Mount Atlas. Here he offered to carry the burden of the heavens for Atlas if the later brought him the apples. Atlas happily agreed and went on to get the apples and soon returned with them (three acourding to Apollod. Bibl. II.5.11), but then refused to take his place under the skies again - he would instead return to Erystheus himself (There was an alternative story where Heracles went after the apples himself and killed the dragon Ladon).
Now Heracles knew what to do thanks to Prometheus and he managed to get Atlas to carry the skies again by stratagem (a Homeric word roughly translating into trickery):
“he [Heracles] begged Atlas to hold up the sky till he should>158 [sic] put a pad on his head. When Atlas heard that, he laid the apples down on the ground and took the sphere from Hercules. And so Hercules picked up the apples and departed.”
Apollod. Bibl. II.5.11. translation by Sir James George Frazer
Heracles then returned to Erystheus and handed him the apples. The king then gave them to the hero again and Heracles decided to dedicate them to Athena, who returned them to the garden of Hesperides.