One of Heracles' twelve labours was to steal the apples, which he did by holding up the sky for Atlas who, as a titan, could saftely take them.
Atlas then decided he didn't want to hold up the sky any more and was about to leave Heracles there forever but Heracles Tricked him by agreeing but...