The flame goes upward even when there is strong gravitational pull like on Earth.The fuel reacts with oxygen to release heat and other gases.The released gases are hotter than the surrounding air.This means that the obtained gases are denser than air,so an upward buoyant force pushes the gases.Applying Archimedes principle : A force equal to the weight of the air displaced lifts up an object surrounded by air.When we are talking about weight we conclude that gravity is the reason for the flame shape and without it hotter gases won’t move upward.
The Earth has its own magnetic field , it acts like there is huge bar magnet buried inside,but this bar magnet is not on the earth rotational axis it is shifted by some angle.The south of the bar magnet is on the magnetic north and the south polarity is on the magnetic north(image).As opposite polarities attract the magnetic needle (north) is attracted to the south polarity in the magnetic north.That’s why the needle always points north.If you want to know “why earth has magnetic field?”go to letter E.