Reasons for the Berlin Wall
There was an exodus of young, unskilled workers from East Germany to West Germany via Berlin (3 million had left by 1958, a sixth of the population of East Germany) and in August 1961 alone, 40 000 East Germans crossed the border
Communism was facing a propaganda disaster (teachers/engineers etc. wanted more money)
Khrushchev gave an ultimatum to Kennedy: withdraw troops from Berlin or be cut off
Kennedy was a new President (from January 1961) so wanted to appear strong but was very inexperienced and refused to make any concessions