The poem must have been passed down orally over many generations, and modified by each successive bard, until the existing copy was made at an unknown location in Anglo-Saxon England.
There are many that would dispute the idea that Beowulf is an oral composition; it bears many marks of a literary, or written, work. In general, scholars are moving away from the oral composition theory for Old English poetry. While there was undoubtedly a rich tradition of oral composition in Anglo-Saxon society, most of the works that survive are probably literary. Which is not to say that the story of Beowulf wasn’t told orally, but that the poem that we know today is a literary (i.e., written) composition. (But we don’t know that the story was told orally. There are no references to the Beowulf story in other works (such references would indicate that it was well known and oft-told), while there are good indications that other poets cribbed passages from it, hinting that it was known as a great poem among the lettered elite.)