The Cylons were created by man to make life throughout the 12 Colonies better. For a time, it was good. And then one day, the Cylons evolved. They rebelled against their human masters.
For 12 years, the Cylon War raged throughout the Colonies as man battled machine armies. Eventually, both sides signed an armistice that ended the war. The Cylons would leave for another world, agreeing to send emissaries who regularly would meet their human counterparts. The humans would send an ambassador to meet the Cylons every year, but the Cylons never did.
Forty years later, the Cylons returned, having evolved even further. In addition to robots, the Cylons had created bio-infiltrators that looked and felt human. In a matter of hours, the Cylons wiped out the Colonies, killing trillions in the process.
Those who managed to escape fled in a fleet led by the Galactica. The Cylons would pursue the remnants of humanity to the ends of the universe…
(And no, there was no plan…)