Quite a lot to answer here but try wikipedia for in depth explanations.
http://en.wikipedia.org/wiki/Magnetic_north
and
http://en.wikipedia.org/wiki/North_Magnetic_Po le
Basically the reason we have a magnetic north is that the earths core is made of liquid metals such as nickel and iron.
To quote from the above links
In early times European navigators believed that compass needles were attracted either to a "magnetic mountain" or "magnetic island" somewhere in the far north, or to the Pole Star.[4][5] The idea that the Earth acts as a giant magnet was first proposed in 1600 by Sir William Gilbert, a courtier of Queen Elizabeth I. He was also the first to define the North Magnetic Pole as the point where the Earth's magnetic field points vertically downwards. This is the definition used today, though it would take several hundred years before the nature of the Earth's magnetic field was properly understood.[4]