The Long Night
From A Wiki of Ice and Fire
The Long Night is the name given to a period in history where a terrible darkness fell across Westeros and the east. It occurred approximately eight thousand years before the War of Conquest, in the midst of a great winter that lasted for years. The Long Night lasted a generation and laid waste to much of the world through famine and terror.
War for the Dawn
According to legends, in the midst of this darkness a race of apparent demons, called the Others, emerged from the uttermost north, the polar regions of the Lands of Always Winter. They were wielding razor-thin swords of ice and raising the dead to fight the living. The children of the forest and their allies, the First Men, fought valiantly against them, but were driven southwards by their advance.
The Others were eventually checked when it was discovered that weapons made of dragonglass could kill them. A great hero, who in the eastern tradition is known as Azor Ahai, led the war against the Others wielding his sword of fire, Lightbringer, driving the Others back. In the Westerosi tradition, he may be known as the last hero.
Steps were taken to ensure that the people would never be caught offguard by an invasion from the North again. The Wall was raised, supposedly by Brandon Stark known as Bran the Builder, an imposing structure of solid ice and magic, stretching one hundred leagues from the Gorge in the west to the Shivering Sea in the east, cutting off the Lands of Always Winter from the remainder of Westeros. The Night's Watch was established at this time to stand watch on the Wall and protect the people from the threat that lay to the north.