Android 18 was abducted by Dr. Gero along with her twin brother, Android 17. She was then recreated as a powerful killing machine. Upon awakening, the twins went on to kill Dr. Gero (who had by then turned himself as Android 20) for fear of being controlled by him. With nothing else to do but fulfill their creator's mission ("kill Goku"), the two androids set off along with Android 16, whom 18 had awoken out of curiosity.
The three androids were quickly caught up by Vegeta, who was infuriated that the three androids would go after Goku and not take any interest in him, the self-proclaimed "prince of the Sayians". When 16 refused to fight him, his mind only focusing on his mission, 18 accepted Vegeta's challenge and defeated him badly in front of Trunks and the other Z-Fighters. When they tried to intervene in the fight between 18 and Vegeta, 17 defeated them. After the fight, the androids left a scared Krillin to take care of his friends, and 18 kissed him tauntingly on the cheek.
Unbeknownst to the androids, a new threat appeared on Earth at that time, Cell. Another creation of Dr. Gero, he was to be the most powerful warrior once his mutation would be complete. For that purpose, he needed to absorb Androids 17 and 18. After escaping a confrontation with Piccolo, he eventually caught up with the androids and quickly defeated 16 and Piccolo, who were trying to prevent the mutation, and absorbed 17. Cell then turned to 18 and tried to convince her to "unite her strength with his to make Master Gero's dream come true" using 17's voice. She however declined, as her brother would never have called Gero "master" after all the suffering he caused them. She then threatened Cell to use her emergency self-destroying bomb, only for Cell to remark that, while the bomb would be charging, he would have more than enough time to absorb her before the deflagration. Thanks to Tien's intervention, Android 18 succeeded in escaping with a battle-worn 16, and went into hiding on one of the near-by islands.
Meanwhile, back in the Capsule Corporation, Bulma Briefs succeeded in recreating the remote that would turn off Androids 17 and 18. As she was on her way to meet the androids, she met Krillin and gave him the device, adding that it would only work in a close range. While Cell was busy fighting Vegeta and Trunks, Krillin found the two androids hiding just below the fighters. But the kiss Android 18 gave him earlier had just stirred feelings in him, and he chose to destroy the remote instead of using it. Upon hearing the device break, 18 finally noticed Krillin and told him he was irresponsible for getting rid of the only thing that could have prevented effectively her absorption by Cell.
That is when Cell finally noticed them, and despite Krillin's, Trunks' and 16's efforts, 18 proved no match and was absorbed, allowing Cell to complete his mutation and obtain a "perfect body".
Later on, during the Cell Games, Gohan hit Cell so hard that he spit out 18's unconscious body. Krillin took care of her and, after Cell's demise, brought her to Dende so that he could reanimate her. When she was told of what had happened since Cell absorbed her, Gohan innocently revealed Krillin's feelings towards 18. She was surprised and turned her back on him, flying off. But as she was leaving, the Z-Fighters, having previously gathered the seven Dragon Balls, called on the dragon to grant their wishes. She stayed to witness what was happening, and saw them ask the dragon to revive Trunks - who had died during the battle - and Cell's other victims, but could not do the same for Goku, who preferred to stay dead so he would not attract any more threats. Instead, Krillin asked the dragon to make 17 and 18 humans again. The dragon could not grant this wish as the androids were more powerful than he was, so Krillin asked for their emergency bombs to be removed. When confronted by his friends, he confessed that he just wanted to make 18 happy, and thought they would be a perfect match - no one knew that 17 and 18 were siblings. Android 18 then came out of hiding to reveal that 17 was her twin brother and certainly not her lover, and that she could never love Krillin anyway. However, before leaving, she did not say "goodbye", but "see you soon".
Android 18 was next seen a few years later, when Gohan visited her and Krillin. The two had meanwhile got married and had a daughter named Marron. Gohan was gathering the Z-Fighters for the 25th Martial Arts World Tournament. Upon learning about the substantial sums that were offered as prize money, she immediately accepted for both her husband and herself.
When the tournament was interrupted after two contestants working for Babidi attacked Gohan, 18 decided not to take part in the chase and stayed on for the money, along with four other contestants, among whom were Mr. Satan (the defending champion who fraudulently claimed to have beaten Cell), and a mysterious fighter who was in fact Trunks and Goten under a disguise. Satan suggested the tournament should go on as a "Battle Royale", with all five contestants fighting at the same time; whoever would be the last one standing would be crowned as the champion.
18 sensed that the mysterious fighter (Trunks/Goten) was potentially her strongest opponent, so she decided to go for him. Meanwhile, the kids also considered 18 as their most dangerous opponents, Trunks telling Goten that he had heard Krillin's wife was stronger than her husband. After pushing the two insignificant fighters out of the ring in on hit, Android 18 and Trunks/Goten started fighting, completely ignoring Satan. Eventually, 18 guessed who her opponent really was, and used one of Krillin's techniques to slice apart the boys' costume, revealing the fraud.
With only Satan left, 18 knew she was the strongest, but instead of beating him she resorted to blackmail : she told Satan he could keep his crown by arranging the outcome; she would pretend to lose to him if he paid her twice the victor's prize money. Satan accepted, and 18 lost on purpose.
She eventually got her cash after Buu's defeat, but not before reluctantly helping Satan getting rid of a biochemically reborn Broly with the help of Krillin, and more importantly Trunks and Goten.
Super 17 Saga (Non-Canon)
A few years later, when her brother 17 was turned into Super 17, he first went to 18 to offer her to rejoin him - the siblings had not been in touch since Cell's death. When she refused, he turned on her family and killed Krillin, before beating 18. She however survived, and later proved pivotal when she resurfaced during the fight between Super 17 and Goku. She challenged her brother and kept firing energy balls at him, thus revealing his weakness to Goku : while absorbing energy, Super 17 was defenseless. Goku succeeded in defeating him, and 18 told him that she felt her brother's soul, the real 17, willingly offering his weakness to her so they could defeat Super 17.
In the future from which the grown Trunks arrived from, Androids 17 and 18 were the only androids. She along with her brother were much more ruthless and less compassionate than the one's from the past. She and her brother killed all the Z Fighters except for Trunks, who escaped to the past to increase his power. When Trunks returned from the past, he easily destroyed 18 followed by 17.