Originally Germany was split four ways between France, the UK, the US, and the USSR. Berlin was also split four ways initially, despite being deep within the Soviet zone of occupation.
Now, Stalin wanted all of Berlin, and tried to force the issue by blockading all supplies to the city for the better part of a year. The Western Allies responded by airlifting supplies (check out the Extra History episode on the Berlin Airlift) and Stalin was forced to back down. This was arguably the first “battle” of the Cold War.
Eventually, the three Western occupation zones were combined into the nation of West Germany, and they did the same with their Berlin occupation zones.
Latest Answers