The Berlin Wall was erected by the East Berlin mayor, most likely on orders from the Soviet Union, in order to keep people from fleeing crappy East Berlin for nice West Berlin. It was also designed to keep those "capitalist dogs" at bay. However, the splitting of Berlin had been so complicated (as there are so many enclaves and exclaves in the area) that some little neighborhoods miles away from Berlin proper had to be taken into account.
The day that the Berlin Wall came down (the anniversary of Kristallnacht and the Beer Hall Putsch) has become a symbol of the power of freedom and is considered the beginning of the end of the Cold War.
Despite being called "The Wall" for most of its history, it consisted of two walls with a cleaned "death strip" between them. The iconic reinforced concrete panels that were torn down in 1989 (and still stand in some places) were part of the fourth revision of the wall, built between 1975 and 1980.