The Great Wall, as we know it, is actually a series of several walls built at different times by different emperors. The categories below are non-exhaustive, and all refer to wall systems rather than single monolithic walls.
First Great wall - built by the Qin Dynasty 221-207 BC
Second Great Wall - built by the Han Dynasty 205-127 BC
Third Great Wall - built by the Jin Dynasty 1200 AD
Fourth Great Wall - built by the Ming Dynasty 1367-1644
First Great Wall
The First Great Wall was ordered built in 214 BCE by Qin Shih Huang Ti after he had finished consolidating his rule and creating a unified China for the first time. The wall was designed to stop raids by the Xiongnu raiders from the north. 500,000 laborers were used during the 32 year building period to create the First Great Wall.
Second Great Wall
Over 70 years later, the Han Dynasty were still fighting the raiders since the Great Wall had been left to deteriorate and the raiders had breached it in several places. In 130 BCE, Emperor Wudi of the Han Dynasty embarked on a program of extending, rebuilding and fortifying the original First Great Wall.
Third Great Wall
In 1115, the Nuzhen established the Jin Dynasty and since they were from the north themselves, understood that the Mongols were right behind them. The Jin emperor ordered the construction of a Third Great Wall to be built in Heilongjiang Province and Inner Mongolia Autonomous Region. The walls built had the characteristics of having ditches running along the walls full length.
Fourth Great Wall
It was not until the battle of Tumu against the Mongols that renewed interest in reinforcing the Great Wall occurred. Between 1569 and 1583, the most well-known parts of the Great Wall were built, the Fourth Great Wall. The reinforced wall managed to repel Mongols several times.