From Battlestar Wiki, the free, open content Battlestar Galactica encyclopedia and episode guide
Created by Doctor Daniel Graystone and Graystone Industries on Caprica some sixty years prior to the Fall of the Twelve Worlds, the first Cylon form is the U-87 Cyber Combat Unit, a robotic soldier designed as cannon fodder for the Caprican Military. A union of existing robot technology and the revolutionary (and stolen) meta-cognitive processor - integrated with the holographic avatar of Graystone's deceased daughter, Zoe Graystone - the prototype U-87 is the first sentient machine in the Twelve Worlds and the first Cylon consciousness (CAP: "Pilot").
The Cylons Were Created By Man
Realizing how useful and lucrative Cylons can be - not simply as warriors - Daniel Graystone muses about Cylon potential:
Within five years, Cylons are integrated into Colonial society as a slave race, with new models based on the original U-87 chassis created for various purposes. Acting as laborers and servants - as well as in their initial function as soldiers - Cylons are everywhere, walking alongside humanity in the Twelve Worlds and provoking some to question their sentience (CAP: "Apotheosis").
And then the day came when the Cylons decided to kill their masters. Within just a few years of their introduction, the Cylons revolt, resulting in a costly and protracted twelve-year war known as the Cylon War. Both Cylon and human take heavy tolls as Cylon basestars and Raiders clashed with Colonial battlestars and Vipers in many battles, both on the ground and in space (TRS: Miniseries, "Razor", "No Exit", "The Plan", Blood and Chrome).
The Cylons - in the form of Centurions - seek to punish their human masters for their enslavement and injustices committed against them. But as they battle to wipe out humanity, they also work to mimic them, performing bizarre and brutal experiments on animals and human captives in order to create biological/machine hybrid. As the war reaches fever pitch, a group later known as the Final Five intervenes, having traveled from the distant planet (the Thirteenth Colony) called Earth. Promising the Cylons the technology to create humanoid bodies in exchange for ending the war, the Final Five depart with the Cylons (TRS: "Razor", "No Exit", "The Plan").
Ultimately an armistice is declared - the Cylons leaving for a world to call their own and the Colonials left to unify their own worlds in a federated government. The unified worlds of the Colonies create a space station for maintaining diplomatic relations, each year sending one officer to meet with the Cylons. The Cylons, in turn, send no one (TRS: Miniseries).
In their exile, the Cylons work with the Final Five to improve themselves, perfecting their mechanical form as well as the race of humanoid Cylons, identical in nearly every way to their human creators, but limited to thirteen models. They also continue to work in secret towards the destruction of the human race, devising a plan to wipe out the Twelve Colonies after Number One leads a coup against the Final Five. Using their humanoid models as agents, the Cylons infiltrate Colonial society, undermining their defenses and setting the stage for another attack (TRS: Miniseries, "Downloaded", "No Exit", "The Plan").
There Are Many Copies
Building their own society and a home for themselves, distant from the Twelve Colonies, the Cylons worship a single, all knowing, all powerful God, a trait passed down to them from the original Cylon consciousness. Though Cylon society thrives on unity, like their human "parents", there is disharmony between the various models. While some are devout in their practice of religion, others are atheist; some peaceful, others violent and corrupt (CAP: "The Heavens Will Rise", "Apotheosis", TRS: "No Exit").
Though there are initially thirteen models of Cylon, one is wiped out, leaving only twelve models including the Final Five:
And They Have a Plan
Forty years after their exile, the Cylons return, surrounding the Colonies with fleets of basestars and bombarding the Twelve Worlds with nuclear weapons, killing billions of people. With the complete destruction of the Colonial Fleet, save the survival of the battlestars Galactica and Pegasus, as well as scattered fleet of vessels, the Colonials attempt surrender. But the Cylons are relentless, attempting to affect a total genocide of humanity (TRS: Miniseries, "Pegasus", "Razor", "The Plan").
Carrying approximately fifty-thousand survivors, one fleet - led by the Galactica - escapes, only to be pursued by the Cylons for four years. As the fleet makes its way to the promised land, the mythical Earth, the Cylons employ every means at their disposal to destroy the fleet. But the survivors carry on. Through many trials and tribulations, despite great suffering and loss, the remnants of Colonial society eventually arrive at Earth, joined by rebel Cylons - only to find it a devastated wasteland, having suffered its own robotic rebellion and nuclear holocaust centuries ago (TRS: "Revelations, "Sometimes a Great Notion").
Adrift in space and without direction, the Colonials once again clash with the Cylons, this time at their home Colony. Destroying the Colony and apparently all but the rebel Cylons, the Colonials blindly jump away, stumbling upon a verdant new planet with more life than all the Twelve Worlds put together. Abandoning their fleet for the safety of this new planet, the Colonials - as well as a contingent of Cylon rebels and the three surviving members of the Final Five - make this world their home, calling it "Earth" and creating a future together (TRS: "Daybreak, Parts I & II").