Venom is a symbiote created by Doc Ock using Peter Parker's DNA, obtained from a blood sample left in a battle with an Octobot. At the same moment it was created, it started to act aggressively, as it was all the deadlest aspects of Peter's personality. Octavius needed a few months to perfect it, but Osborn only gave him a month to do so. Otto told him he will have something for him that night, but the symbiote escaped and as Doc Ock said; it wanted to return to where it came from: Spider-Man.
Symbiosis
It followed Peter to Harry Osborn's house, where it, at first, tried to kill him. After realizing that Peter is Spider-Man, it became confused and began jumping from host to host. Peter Parker and the symbiote fused into Venom.
Using it's ability to latch onto anyone and use their powers while taking control of their bodies, it fused with Nova, Power Man, Iron Fist and even Flash Thompson in the process. After bonding to Spider-Man, it became complete and proclaimed itself as Venom, and attempted to kill Peter's friends and allies. When it targeted Harry, Peter suddenly began to regain control and fight back, and eventually broke free. Although he couldn't best Venom in hand-to-hand combat, he trapped Venom and shocked him with the recently acquired "electro-webs", seemingly destroying him. Norman Osborn later admitted to Octavius that the symbiote was a success, and that he wanted a new prototype, one that Spider-Man and his friends couldn't defeat. Octavius stated that he would begin working on it.
A small piece of the symbiote ended up on a piano in Harry's family room at some point, likely while it was jumping from from host to host. Without Peter noticing, Harry scraped it into a bottle, trapping it, and keeping it.
After attempting to train the symbiote, Harry Osborn used it to impress his father, becoming the new Spider-Man. Harry revealed to Peter that he was the new Spider-Man, not knowing Peter was the original, and assured him that he had it under control. When his father blew him off, Harry became enraged, and the suit began to feed off his negative emotions. During a battle with a Robot Dragon Man, the suit began to consume Harry, and eventually transformed him into a massive, hulking creature. The new Venom fought Spider-Man across the city, until he was thrown into a massive television screen. The electricity caused the suit to explode, freeing Harry. The symbiote seemingly still haunts Harry.