Welcome to FT!
Depending on the aircraft type, either cabin crew or the flight deck controls the temperature. I cannot say for certain whether the 747 cabin crew can control it, but they do have this ability on all Airbus planes (look for the control settings in the galley, above the crew seats.)
Essentially 'fresh' air comes from the cabin top and is recirculated by the slits at the bottom side of the cabin walls. There are heating and air conditioning units in the plane that get the mix right, but essentially hot air passes by the engines, whereas there is plenty of cold air outside to regulate.