The story of how the Great Wall of China came to be actually has its beginnings years before with more primitive fortifications.
In early Chinese history, China was actually divided into separate state groups lead by feudal lords. Through the course of wars and a lot of fighting, China was eventually unified under one ruler and all other walls that had been previously contructed were torn down. In order to protect China from invasion by surrounding nomadic tribes, the building of the Great Wall was renewed in the middle of the 1400's with the defeat of the Ming Army.
Over the course of time, the wall was built and attacked from time to time as well. However, the Chinese would rebuild and continue to build the wall. It helped in the defense of their capital, Beijing. Today, though, the wall has fallen into disrepair in many sections, though there are certain areas that have been rebuilt or improved for tourists. Certain areas of the wall have also been partially removed and the stones used for building roads or houses in local villages.
The Great Wall of China, however, is still a great marvel to see.