Android 17 was created by Dr. Gero as a weapon of the Red Ribbon Army. His main purpose: Kill Goku and complete Dr. Gero's revenge. Along with his counterpart, Android 18, they were originally humans. When Gero, now an android himself, was taken by surprise by Vegeta's Super Saiyan transformation, he woke 17 early.
Once revived, 17 quickly killed Gero and with his sister woke the experimental Android 16. Together they all sought Goku to complete their mission. On their way, 17 tried to get Piccolo to reveal where Goku was, as since he was in bed with the heart virus, never appeared. 17 fought with Piccolo, who was confident now that he merged with Kami and become a Super Namekian, before Cell appeared, and absorbed 17 so he could reach his Perfect Form. After absorbing 17, Cell gained a tremendous spike in power, and gained the strength to defeat 16.
After Cell's defeat, the Dragonballs were used to resurrect all those that Cell had killed, including 17. He was later seen leading a normal life and donating his energy to help Goku defeat Majin Buu.
In an alternate future, 17 and 18 easily killed all of the Z-Fighters, leaving only Gohan and Trunks. This version was far more evil and ruthless. Gohan was killed in battle and Trunks came back in time to warn those from the past of the androids awakening. Trunks helped in the past and returned to the future far more powerful, easily killing both androids.
Dragon Ball GT
In Dragon Ball GT Android 17 was used by Gero and Dr.Myuu to merge with another Android 17 designed by them in hell. The fusion resulted in the creation of a new villain Super Android 17, while Gero believed he was controlling the Android but Dr.Myuu was actually the one giving orders Gero was Killed by Super Android 17 who also killed Dr.Myuu later after being confronted by Android 18 about taking orders from others and not being able to make his own decisions. He was defeated by Goku and Android 18 working together, 18 distracted him while Goku used Dragon Fist attack on 17 to finish him.