At the end of WW2 Germany was split up into 4 sectors controlled by the 4 victorious powers of WW2 (Britain, France, USA, and USSR).
The British, French and USA sectors were soon merged to form the Federal Republic of Germany (commonly known as West Germany), whilst the Soviet Sector became the German Democratic Republic (Note it was far from democratic despite its name) (more commonly known as East Germany).
Only the East(Soviet controlled sector) was ever Communist.
The historic German capital of Berlin, although in the East was a special case. Berlin itself was split into 4 sectors after the war. West Berlin was part of West Germany despite being completely surrounded by East Germany.
Life in East Germany compared to the west was very bad. People were very poor and goods were in short supply. For example, assuming you could afford a car, you had to wait years on a waiting list to get one. When you did it was a very basic car known as a Trabant.
By the 1960s the problem of people trying to escape East Germany became such a problem that the East German government decided built a massive wall through the middle of Berlin. They told the people of East Germany it was to protect them from an attack by the West.
Many people died trying to escape East Berlin, they were shot by East German soldiers guarding the wall.
The wall was re-enforced several times in the intervening 30 or so years. There were actually around 4 generations of wall. The final generation actually consisted of two walls one known as the "Hinterland wall" on the East German side and the other (what is commonly known as the Berlin Wall - around 3.5m high) on the West Berlin side.
Between the two walls there was a strip of land (known as "the death strip" or no man's land) upto half a mile wide. This was packed with various features to make crossing the border difficult (and spotting escapees easy) such as attack dogs given free run, trip wires connected to automatic weapons, watch towers, ditches, anti vehicle traps, flood lights.
The division of Germany was pretty indiscriminate, especially in Berlin, where families were separated and in some cases streets were divided into two by the wall.
The start of the fall of communism was in 1989. Communism had already fallen in a number of other East European states earlier that year and East Germans had found a new way to the west cutting through the former communist states of Eastern Europe. The East German government had no option other than to re-open the border in Berlin, this very quickly led to people flooding out of East Germany to the West and the fall of the East German government.
West and East Germany were reunited in October 1990.
EDIT: In response to "34th B.G. - USAAF":
1. I would point out that, when I talk about Communism coming after WWII, I'm actually talking about when there was a communist government in Germany. Whilst it is true there was communist sentiment in Germany prior to WW2, as far as I can tell, they did not hold power. (It isn't really correct to term Nazis as communists.)
2. Minor correction Checkpoint Charlie was at Friedrichstraße almost a mile away from the Brandenburg Gate (been there). However, both were undoubtedly provide a strong focus/symbol of the cold war and the post WW2 division of Europe. See rough map skteched out in Google maps below. It shows the approx route of the outer wall from the Brandenburg Gate (The Brandenburg gate itself, was actually in the middle of the Death Strip) to Checkpoint Charlie (a very short section of the wall). You may notice lots of bare patches of Earth, especially around Checkpoint Charlie. This is where land was cleared to make way for the border and hasn't been re-built on yet.
3. In terms of people who were killed. Perhaps the most famous is Peter Fechter. He was 18 when he died. He managed to get across the border and was climbing the wall on the Western side when he slipped. The guards shot him. He was left to bleed to death for over an hour in the death strip. Western soldiers, police and journalists could only look on as they too would have been shot had they climbed over the wall to rescue him.