There is a relation between the fuel burned and the color.Explanation of it is that electrons in the atoms of the fuel used are excited due to heating (energy).They move from ground state to higher energy level and when they return back they emit photons of different wavelengths.Each wavelength corresponds to a certain color. Sodium emits orange light when burned. If you see blue in wood flames,it is from(not "from" use, "because of") the burning of carbon and hydrogen.Red comes from lithium ,and copper will make green or blue flames when burned.
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.