5th or 6th-century Scandinavia
OK, follow us closely here, because this does actually get a little bit confusing. Beowulf is an epic about a glorious past. But it's not just in "the past" now for us as 21st century readers. It was always set in the distant past. Beowulf was first told in Anglo-Saxon England sometime between the 8th and 11th centuries, but it's not about that time and place. It's actually set several hundred years earlier, in the 5th or 6th century. And it doesn't take place in England. Instead, the action happens in the land of the Danes (what is today the nation of Denmark) and the land of the Geats (what is today the nation of Sweden). So, if someone asks you what the setting of Beowulf is, you can tell them that it's 5th or 6th century Scandinavia. (Scandinavia is the part of Europe that includes Sweden and Denmark.)
So why did the late-medieval Anglo-Saxons tell stories about early-medieval Scandinavians? Well, mostly because those Scandinavians were their ancestors. It's sort of like when 21st century Americans tell stories about Robin Hood back in Merry Old England. In each case, we look to a distant homeland where some of our ancestors came from and we tell a legend about the heroes in our past.
Another thing you may be wondering: what is 5th or 6th century Scandinavia like? Well, you'll get a definite feel for it as you read Beowulf, but if we had to sum it up in one word, we'd probably say "brutal." Different tribes, such as the Geats, the Danes, and the Swedes, lived in constant warfare with one another. Kings were little more than local strong men who had a lot of treasure and some powerful warlords to back them up. Pretty much everyone could expect to die in battle, or in a raid from a neighboring tribe. Blood-feuds between tribes and revenge killings were common. Boasting, or telling everyone about your prowess as a warrior, was an important part of heroic conduct – as was paying rewards to your followers with golden rings and armor. For the warriors in the highest circles of society, life was made up of feasts, drinking, boasting, bloody battles, the spoils of war, and an untimely death. If you were a peasant, it was even more brutal than that. But there aren't very many peasants in heroic epics like Beowulf.