There were air, river, rail and road access routes between west Germany and west Berlin. These were agreed after Germany was divided between the 4 allies and were generally respected throughout the cold war, bar a few exceptions such as the Berlin blockade.