Given the relative paucity of materials related to Romano-British and Anglo-Saxon England - recall that, prior to the formal "starting" of the Anglo-Saxon Chronicle (more about that below), historical written materials prior to the mid-700's consisted of Gildas' 6th Century history up through around 500 A.D. and the Venerable Bede's Ecclesiastical History of The English People. Between the 700's and late 800's, more written works had begun to appear - early law codes for example, and what would become the basis of the Anglo-Saxon Chronicle - but not a great deal of history. Thus, in some ways we have a fairly limited view of individuals within the time period - king lists, lists of bishops, but not a lot of insight into individuals that made up the period.
Fortunately, we have a few. One such is Alfred.
Alfred, of course, did not begin with the nickname "The Great". He is recorded as being the youngest of five sons born in 849 A.D.. His father Æthelwulf (ruled 839 - 858 A.D.) was King of Wessex, a descendent of Cedric, the founder of the Wessex Dynasty (arrived Britain circa 455 A.D.). From what is recorded of Alfred's childhood, he was a sickly child and certainly not considered to be in line for the throne - after all, he had four elder brothers who would likely inherit the title. Raised in the ever-moving court of the King, he grew up as a favorite youngest son, listening to stories and apparently having a rather good memory for the spoken word. At the age of four he was sent by his father to Rome and was received with great honor by Pope Leo IV. Two years later, he accompanied his then-newly widowed father back to Rome. As part of their travels there, he stopped in the court of Charles the Bald, King of the Franks and a grandson of Charlemagne. These events may have impacted his later life, as he became an alms giver for himself and the West Saxons to Rome and, when he revived intellectual life in Wessex, he reached out to the Kingdom of the Franks for scholars and churchmen.
This period of Anglo-Saxon history was dominated by the Vikings: the Vikings (largely Danes) had first overwintered in Kent in 851 A.D. and later (865 - 867 A.D.) The Great Heathen Army first landed and was bribed and sent against the other Anglo-Saxon kingdoms, then began taken territory throughout the land. During this time the Kings of Wessex changed hands: King Æthelwulf had to yield partial power when his second son, Æthelbald, demanded the kingdom be divided into two (his oldest son Æthelstan, likely died in the early 850's from a Viking battle). It was divided in Wessex and Kent, ruled first by Æthelwulf until his death in 858 A.D., and then by his son Æthelbert until Æthelbald's death (855 - 860 A.D.). When Æthelbert died childless in 866 A.D., his brother Æthelred became king (866 - 871 A.D.).
By the end of Æthelred's reign (870 A.D.) the Vikings had moved from their conquest of the North and East of Britain and come to Wessex. Æthelred won a victory in January 871 at Reading and then after at Ashdown, but was then defeated at the battles of Basing and Meretun. He died soon after, by Easter 871 A.D. and Alfred at the age of 22 became King of Wessex, a Wessex defeated and under threat.
Alfred did the only thing he could at the time: he paid the Vikings off with money (the Danegeld) to buy some time. The Vikings went first to London for Winter quarters, then headed North to re-invade Northumbria, circling back down through Mercia. By 875 A.D. they were back for another go at Wessex.
The creation of the Danelaw matters because it created a separate people with a separate language (Norse) and a separate culture in Anglo-Saxon England. The Vikings themselves (mostly Danes) would merge into the general population, but their customs and practices and the enrichment of the Anglo-Saxon Language by their vocabulary would continue for centuries after the Danelaw itself disappeared.
Thus 878 found Alfred and his kingdom - Wessex and its dependencies and the now largely shell kingdom of Mercian (its ruling house had been destroyed by the Vikings) - free from the immediate threat of invasion for the first time in 13 years.
Keynes, Simon and Lapidge, Michael: Alfred The Great: Asser's life of King Alfred and Other Contemporary Sources. Penguin: Great Britain, 1983.
Brooke, Christopher: From Alfred to Henry III 871-1272. Norton Library: USA, 1961.
Trevelyan, G.M.: History of England Volume 1: From the Earliest Times to the Reformation. Anchor Books: USA, 1953
Nicolle, David: Arthur And The Anglo-Saxon Wars. Osprey Publishing: Hong Kong, 1984
Heath, Ian: The Vikings. Osprey Publishing: Hong Kong, 1985
Harrison, Mark: Viking Hersir 793 - 1066 AD. Osprey Publishing: Hong Kong, 1993.