In brief…
“Earth”, the lost 13th colony, had originally been populated by an earlier race of Cylons that was created on Kobol and rose up against the humans there, and that war was the cause of the evacuation of Kobol. As time passed, the Earth-Cylons became biologically human, capable of reproduction, and lost the ability to download. In time, they created another race of Cylons, which also rose up, leading to nuclear war and the destruction of Earth.
Shortly before that war, a small group of Earth scientists (i.e., the Final Five - Saul and Ellen Tigh, Sam Anders, Galen Tyrol, and Tory Foster) had been experimenting with, and eventually rediscovered resurrection and downloading. When the war happened, they died and resurrected on a ship they had set up in orbit, and decided to travel to the Twelve Colonies to warn the humans against creating artificial intelligence. Because they didn’t have jump technology it took several thousand years for them to get there, and they arrived in the middle of the First Cylon War. They made contact with the Cylons, whose attempts at producing biological life had only resulted in the Hybrids, and offered to help them create organic Cylons if they agreed to stop the war - which they did, immediately withdrawing behind the Red Line.
The first human Cylon they created, Number One (aka. John/Brother Cavill), resented the Five for giving him the limitations of the human form rather than godlike abilities. He killed them, forced them to resurrect with no memory of their past and implanted memories of human lives in the Colonies, and took control of the Cylons, eventually engineering their destruction of the Colonies and pursuit of the fleet.
In the 4th season proper, Starbuck comes “back from the dead” to everyone’s surprise, including her own when she discovers her own charred corpse in the wreck of her Viper. Her visions lead the fleet to the original Earth where they gradually discover the secrets mentioned above. Meanwhile, the Five have been hearing “All Along the Watchtower” in their heads, which as it turns out was a song that Anders knew when he lived on Earth, and which Starbuck’s father played on the piano when she was a child. During the Galactica’s final battle at the Cylon home colony, she inputs the notes that make up the song’s main riff into the ship’s computer as jump coordinates and it leads the Galactica, and the Cylons who had joined forces with it, to our Earth, circa 150,000 BC. Upon discovering that the planet is habitable and that its Neanderthal inhabitants are genetically compatible with themselves, they settle there and name it “Earth” in memory of the lost colony. Starbuck realizes that her work is done and ceases to be, vanishing in an instant. The humans and Cylons presumably interbreed with the Neanderthals and eventually become the forebears of the modern human race, and Hera - the first child of a human father and a Cylon mother - becomes Mitochondrial Eve, the common female ancestor of all living humans today.
The ultimate implication is that an alien or supernatural power - i.e. the Lords of Kobol or “God” (though it doesn’t like to be called that) - has been responsible for Roslyn’s visions, for Baltar’s and Six’s mutual encounters with a spectral version of the other, for “All Along the Watchtower” as a coded message containing our Earth’s location, and for Starbuck’s apparition after her physical death. Throughout the series, it has been masterminding these events in the hope of ending the cycle of “Man creates AI, AI rebels and destroys man, AI becomes human and creates new AI” that has presumably occured many times over in history. The final scene leaves us with the angelic forms of Six and Baltar wondering whether this has been achieved or not, and the ultimate answer is left to the viewer’s imagination.
Does that help?