Jelly doughnuts are called "Berliner" outside Berlin (but usually referred to as "Pfannkuchen" in Berlin itself). This has led some people to believe that the phrase Kennedy uttered was amusingly ambiguous ("I am a jelly doughnut"), which is, for the most part, incorrect. While the phrase could possibly be understood that way, both the context of the quote and the fact that jelly doughnuts are not actually called "Berliner" in Berlin made this unlikely. Normally a Berliner would say "Ich komme aus Berlin" ("I am from Berlin"), but because Kennedy wanted to emphasize the common identity among people of the "world of freedom", that usage would have been misleading. "Ich bin Berliner" (cf. "Ich bin Amerikaner", "Ich bin Deutscher" etc.) would be preferred in common usage, but "Ich bin ein Berliner" is not grammatically incorrect (especially in a larger context such as "Ich bin ein Berliner von Millionen" - "I am one Berliner among millions").
The jelly doughnut urban legend apparently arose in Florida in the 1980s and culminated in a letter to the editor to the New York Times in 1987 which claimed that the error was embarrassing and resulted in laughter. The context made the meaning very clear, though, so nobody misunderstood Kennedy when he delivered his speech. He did however pronounce the sentence with a very strong American accent, reading from his note "ish bin ine bear-LEAN-ar". Contrary to the urban legend, it was not followed by a roar of laughter. Audio and film recordings show the remark was followed by applause and cheers, as was witnessed by television audiences in Europe and the United States at the time.
Interestingly, Kennedy did get a laugh a moment after he first used the phrase, but deliberately. His speech was being translated into German for the crowd phrase-by-phrase. "Ich bin ein Berliner" was "translated" to itself, resulting in the interpreter parroting what Kennedy had just said a moment before. As the applause died down, Kennedy paused for a moment, then said: "I appreciate my interpreter translating my German", a quip which did receive a solid laugh from the crowd.