Venom's origin varies, depending on which Marvel story you read. Beginning life as a costume change for Spider-Man, it grew into a creepy living skin, before finally being revealed as a sentient, symbiotic entity. In addition to self-awareness, Venom landed two official histories.
The symbiote's first backstory was established during the aptly named "Planet of the Symbiotes" story arc in 1995. Taking place throughout several oversized one-shots, including Venom Super Special #1, the narrative introduces a whole mess of slavering alien life forms. It seems members of Venom's species decided the Earth was looking far too delicious, what with its hundred course meal of unseasoned emotions and neuroses. During a trip to a conquered planet, the truth about symbiotes comes out. Unsurprisingly, the otherwise-unnamed race isn't exactly the sympathetic type (rather, more the hostile, domineering folks). As a result, sweet little Venom became an outcast due to his benevolent nature, as its whole cooperate and share feelings outlook didn't sit well with their conquer and command attitude.
Eventually, Spider-Man, Venom, and Scarlet Spider managed to beat back the savage skins. Perhaps due to their defeat (but probably thanks to the magic of retroactive continuity), the nasty symbiotes' backstory changed into a peaceful one twenty years later. In the meantime, it made for a curious adventure into the darkest heart of codependency.