during the secret wars, spidermans costume was torn from a recent battle and he needed a way to repair it. Someone stated to spidey that there was a machine in the base that repaired everyone's costumes but he unknowingly tried the wrong machine and as a result his costume turned black. At first he thought it was simply a costume enhancement but later began realizing that it gave him more energy, power, and strength then ever before. Eventually (a while after the secret wars ended) he learned that it also made him more agressive in nature and that it was trying to merge with himself. With the help of Mr. Fantastic they discovered that it was not a costume but a symbiote. I cant remember the exact details after this but Spiderman uses the bells from a cathedral to get the symbiote off of him and effectively rejecting it. the symbiote finds eddie brock, a person sharing in the symbiotes new found hatred of peter parker. The two gladly merge and the symbiote gives eddie all of peter parker's memories, ambitions and fears. Not to mention the symbiote learned how to mimic spiderman's powers and amplify them.
btw, eddie hated parker because (i think) eddie made a bogus story about some mass murderer and peter debunked the whole thing, causing eddie to lose his job.
<< and i thought the suit came to earth when jonah jameson's son (an astronaut) accidentally brought it back with him from a trip in space >>
that was in the cartoon, which although was entertaining, had little in common with the chronology of the comic books.