From Civ World
The Great Wall is a Great Wonder that can be built from the Wonders screen. It prevents foreign civilizations from attacking the civilization. It becomes available after the Masonry technology is discovered.
When a foreign civilization has sufficient votes to start a battle, there is a check to see whether the defending civilization has The Great Wall, and if so, no battle will occur. The Great Wall will not stop attacks already in progress, nor will it prevent foreign civilizations from initiating a vote to attack.