The pre-Borg era on their home world had seen the invention of mechanical implants that were designed to help people with handicaps. These devices would be things that could replace a severed limb, but unlike a prosthetic limb, they would have close to the same characteristics of a normal limb. (i.e. the ability to control it like it was that person's natural arm or leg)
A woman came upon the doctors with sever cranial and back damage. The doctor replaced those areas with these new implants and sent the lady on her way. Some time later this woman found that she could manipulate computers without a keyboard, mouse or touch screen, but with the thoughts and a sub-space transceiver that the doctor had implanted on purpose or accidentally. After this discovery, she found a way to take over the computer systems on her planet, she redesigned all the implants so that they all had a transceiver in them. This allowed her to take over all the members of her race that had implants, and force them to do as she wished. After she had completely taken over her planet and assimilated the population she did two things that assured her immortality.
The first was to replace most of her body with cybernetic components, the other was to clone herself. Theses clones were identical in every way to the woman herself, known to us as the "Borg Queen", right down to each component of their cybernetic bodies. After they had their bodies set the Queen gave them the information on how to control the Drones and gave them each a compliment of Drones and their own ship. Although some may think that this act showed that she had given up power, it doesn't seem likely. This was her way of controlling more space without the need to move every Borg along with her. The Queens on the ships extended the reach of the home world Queen to an infinite area.
The Home world Queen acts the same way for the Ship Queens as the Ship Queens do for their Drones. But the Ship Queens don't have to stay in constant contact with the Home world Queen because they can think on their own more than the Drones.
After they formed their Collective they rampaged the Delta Quadrant. Any civilisation that had technology that they came across was doomed.
First Contact:
The first known contact between the Borg and the Federation was in 2365, when Q transported the Enterprise-D out of Federation space and into the flight path of a Borg vessel heading toward the Alpha Quadrant.
Following this first contact, Starfleet began advance planning for a potential Borg offensive against the Federation. Lieutenant Commander Shelby was placed in charge of this project to develop a defence strategy.
The anticipated Borg attack came in late 2366 when a Borg vessel entered Federation space, heading for Earth. Starfleet tactical planners had expected at least several more months before the Borg arrival, and thus were caught unprepared.
The Enterprise-D captain, Jean-Luc Picard, was captured by the Borg at the beginning of this offensive. He was assimilated into their collective consciousness and became known as Locutus of Borg, providing crucial guidance to the Borg in their attack. Starfleet masses an armada of some 40 star ships in hopes of stopping the Borg ship at Wolf 359, but the fleet was decimated with the loss of 39 ships and 11,000 lives. As Locutus, Picard explained that the Borg purpose was to improve the quality of life in the galaxy by providing other life forms the benefit of being part of the Bog collective.
Following the rescue of Picard from the Borg ship, a last ditch effort to implant a destructive computer command into the Borg collective consciousness was successful in destroying the Borg ship in Earth orbit.
By 2368, at least two more Borg vessels were found to have reached Federation territory when a crashed Borg scout was rescued from the crash by Enterprise-D personnel.
This Borg, named Hugh by the enterprise-D crew, was nursed back to health. During Hugh's convalescence, Enterprise-D personnel developed what they termed an invasive program, which, when introduced into the Borg collective consciousness, was designed to cause a fatal overload in the entire collective. In the process, Hugh befriended Geordi La Forge, a friendship that provided an argument that this invasive program, effectively a weapon of mass murder, should not be used. Hugh was then returned to the Argolis crash site, where he was rescued by another Borg scout ship. Following the return of Hugh, Hugh's new sense of individuality began to permeate a portion of the collective. The results were dramatic: deprived of their group identity, individual Borg were unable to function as a unit.
Present:
Known Borg vessels:
Borg Scout ship: Small Borg vessel. Cubical in shape with a mass of 2.5 million metric tons. The ship generally carried a crew of five. One such ship was discovered crashed on a moon in the Argolis Cluster in 2368.
Borg Cube: Huge cube shaped spacecraft, first encountered by the Enterprise-D near System J-25 in 2365. It had a highly decentralised design and Enterprise-D personnel reported finding no specific bridge, engineering or living areas. Combat experience showed the ship to be equipped with powerful energy weapons and capable of repairing major damage almost immediately, including the impact of direct phaser hits. Each Cube houses around 350.000 drones.
Borg Sphere: Smaller than a Borg Cube, the Borg Sphere is probably the nucleus of the Borg Cube and "personal" craft of the Borg Queen, most likely an escape pod. The Borg Sphere is a dangerous weapon and star ships that encounter them should know there is a Queen aboard, and the Borg will fight to the last drone to protect her.
Borg Drones: Borg Drones are the army of the Borg. They act as the engineers, security and science officers of their ships, transmitting data to the collective and receiving orders from the Queen. These are the enemies countless races have fallen to, being assimilated by the drones into the collective, the individual's knowledge and skill becoming the collectives. This is the enemy Starfleet and the Federation will face, and hopefully we'll be able to defeat them once and for all.
Borg Weaknesses:
Contrary to popular belief, the Borg has one major weakness. They cannot adapt to weapons of mass. Meaning, a Borg who is shot by a 20th Century .44mm could not send a signal to the rest of the collective, who would develop an invulnerability to it.
This was proven twice in the Borg events on the USS enterprise-E. First, in his logs, Captain Picard described a fight with the Borg in which to escape several drones, he ran into a holodeck and ran a program in which a 20th Century Thomson sub-machine gun was involved. To "kill" or deactivate the drones, Picard removed the safety features in the holosuite and shot at them. Needless to say they were deactivated.
The second was when Lt. Commander Worf realised that the phasers could not be adjusted, because all possible combinations had been used and the Borg had become invulnerable to them, he took out a Klingon blade and chopped off a Borg's arm, deactivating it. This is the only known weakness of the Borg.
Starfleet Preparations:
After the attack on Earth by the Borg, the Starfleet Admiralty realised a more effective defence must be hastened into action. One of these plans was the creation of Bravo Fleet, the elite group of individuals guarding section 249, beyond the Klingon Empire, against a possible Borg invasion. Although the Borg threat seems to have wound down, the near possibility of the Borg attacking the Federation or Klingon Empire is enough for a proper defence to be laid down.