When 'The Namek' came to Earth, he tried to become the new Kami. The previous Kami saw far too much evil in him, and forbid it. In order to gain the position, The Namek had to dispel all the evil inside him. He was successful, but not in the way he had hoped. He litterally split into two people. One, Kami, consisting of pure good, the other, King Piccolo, consisting of pure evil.
King Piccolo fell to Earth, and dubbed himself the Demon King (since all the offspring he made would come out as hideous demons)
Piccolo waged a 100 year war on Earth, where he pretty much wtfhaxed all the Earth's armies with his super duper demon force. In the end, only one force remained: The martial arts monastery of Mutaito (The teacher of Crane and Roshi)
Master Roshi and Crane Hermit were able to defeat most of the demons, but Piccolo fucked them up. Their master, Mutaito, used an attack of his own creation, the Mafuba (Evil containment) wave, to imprison Piccolo forever.
Then Pilaf comes along hundreds of years later and fucks it up by releasing Piccolo.
Anyway, Piccolo has his minions kill every martial artist on Earth, to make sure that doesn't happen again. Piccolo gets the dragonballs and wishes for his youth, then kills the Eternal Dragon and takes over the world
Goku learns to unlock his ape form strength without needing to transform, and defeats Piccolo. Before dying, Piccolo spits out one last egg, which he pours his own memories and soul into. When this egg hatches, it becomes 'Junior', the Piccolo we know in DBZ