After WorldWarTwo?, in 1949 at the PotsdamConference?, the winning countries FrancE, EnglanD?, UnitedStates and SovietUnion decided to divide GermanY in 4 parts. Each country controlled a part former GermanY.
While soon the three areas controlled by the UnitedStates, EnglanD? and FrancE reunited and formed the "Federal Republic Of Germany", the Soviet part was made a own country too, the "German Democratic Republic". It was also called EastGermany. EastGermany was under heavy influence of RussiA and became a CommunisT? country very soon until the only link to DemocracY was the part in its name.
EastGermany soon started to seperate itself from WestGermany? (which became more and more democratic and capitalistic, with help from EnglanD?, FrancE and most of all, the UnitedStates) by closing the open borders by fences, turrets, dogs and most of all huge walls. A very interesting thing about the whole situation : Just like GermanY was divided after the war, also Berlin, former capital of Germany was divided. Since Berlin was inside the Soviet part of Germany, the areas of Berlin being held under the control of the three western countries soon became known as WestBerlin?.
So when EastGermany closed the western borders, it also literally enclosed WestBerlin? within a huge wall, the BerlinWall?. Anyway, there is too much historical stuff to talk about, Kennedy visiting WestBerlin? and saying "I am a Berliner!" (which is a popular cake in Germany, btw); East and West Germany using WestBerlin? as an outpost and ground for the Cold War, the cold war itself and all that.
In 1989 the BerlinWall? fell and with it the whole CommunisT? system of EastGermany, both parts re-united and became "GermanY" again.
But still there are lot of differences between the formerly "eastern" and "western" parts of GermanY (both in lifestyle, wealth, political beliefs and such) and so we still talk about eastern and western Germany.