Who comes to Beowulf's aid in the final battle with the dragon? Why does he help Beowulf?
In Anglo-Saxon culture, several things are most important: a belief in fate ("wyrd"--the old English word for fate which eventually becomes "weird" as in the Weird Sisters of Macbeth), loyalty to kinsmen, loyalty pledged to kings/lords, and fame.
Wiglaf comes to Beowulf's aid for all of these reasons. He is related by blood to Beowulf, he has pledged his loyalty as a warrior to Beowulf, and he wants to be famous so he can live forever in the songs and stories told by the bards long after he is dead. Although they are greatly outnumbered by the skill and danger factor of the dragon, the two of them fight bravely while the other warriors simper in cowardice and watch from the safety of the woods.
After the battle, Beowulf names Wiglaf his heir and gives him two commands knowing Beowulf is on his deathbed: 1) claim the dragon's treasure as payment for winning the battle and give it to his people 2) build a grand tower so that all who see it will forever remember Beowulf (the fame thing again).
Wiglaf also harshly reprimands those warriors who ran for being without a sense of honor and duty and for going back on their pledges to the king.
Beowulf has ruled as the King of the Geats for fifty years when a dragon starts to threaten the land as revenge for a slight against him (a desperate man has stolen a golden cup from the dragon's treasure stash). The dragon terrorizes everyone and burns down Beowulf's hall, resulting in Beowulf deciding to fight the dragon. He organizes an escort of twelve warriors (plus the golden cup thief as a guide) but then decides that he must fight the dragon alone.
Unfortunately, Beowulf can't manage to kill the dragon alone, and it is the young warrior Wiglaf who comes to his aid and helps him kill the dragon. Wiglaf does this out of a sense of deep duty and allegiance to his leader.
Although they manage to kill the dragon, Beowulf perishes and names Wiglaf as his successor, asking him to take care of the Geats, to seize the treasure as reward, and to build a barrow in Beowulf's honor.
Wiglaf is the only man who does not run from the dragon and who comes to Beowulf's aid. He does so because he remembers and is grateful for Beowulf's generosity in giving him a landholding. He also realizes that, although he is still a great warrior, Beowulf is getting older and is not able to defeat the dragon by himself.