Trunks grew up in an alternate timeline where Goku died from his heart virus. When Android 17 and Android 18 emerged, they slew all the Z Warriors, including Trunks' father. Trunks grew up in a world in constant fear of random attacks from the androids, and grew increasingly frustrated as his mother kept him away from conflict. Trunks eventually found a mentor in Gohan, the last surviving Z Warrior and a Super Saiyan. Under his tutelage, Trunks became a strong warrior, but was unable to take on the androids. Gohan lost an arm in one battle, and fell in a two-on-one match against the android twins. Enraged by Gohan's death, Trunks ascended to the level of Super Saiyan.
Years passed, and Trunks made another attempt to destroy the androids, only to be severely beaten and left for dead. His mother, after nursing him back to health, convinced him to take another approach towards saving the world- use her newly completed time machine to travel to the past, and change history. Trunks agreed, and travelled back to August 764. There, he made quite an entrance, revealing his power as a Super Saiyan, and slaying both Frieza and King Cold. When Goku arrived, Trunks warned Goku of his heart virus (giving him a medicine for it) and warning him of the coming of the androids in three years. Trunks then returned to his future.
Unfortunately, nothing had changed. Trunks trained for a year, then returned to the past (767). He was further shocked to see that he had changed the past, with two unknown androids (Android 19 and Android 20) in place of the villains he was familiar with). Trunks joined the Z Warriors, finally realizing Android 20- alias Dr. Gero- was about to release 17 and 18. He tried to destroy them, but failed. While the other Z Warriors went to prepare for the coming battle in various ways, Trunks joined with [Krillin] and Gohan to take his mother home, but soon discovered a duplicate of his own time machine, aged many years. They thus discovered the first clues to [Cell]'s presence.
Trunks and Krillin raided and destroyed Gero's lab, including the gestating embryo of Cell, and took the plans to the androids with them. Bulma used the plans to create devices that could deactivate the androids. (At this point, an alternate Trunks took one of the devices back to his time, and used them to defeat 17 and 18. This was Cell's home timeline- the weaker Trunks was easily slain by him, and he took Trunks' time machine to the past.)
Trunks entered the Hyperbolic Time Chamber (Room of Spirit and Time) with his father, where they both trained to an enhanced Super Saiyan level over the course of an accelerated year compressed to one day. The pair left to confront Cell, who had ascended to his second stage after absorbing 17. Trunks was unable to stop Cell from absorbing 18 (Cell had a bit of help from his father), and was unable to defeat Perfect Cell with the power of the Ultimate Super Saiyan Stage 3 form. Humiliated, he offered Cell the chance to kill him, but instead Cell decided to initiate the Cell Games.
The half-Saiyan trained for another virtual year in the Time Chamber, but didn't actually participate in the Cell Games. However, when Cell returned from his apparent death in an even stronger form, his first act was to slay Trunks. He was resurrected by the Earth Dragon Balls. Trunks finally returned to his future, and easily destroyed the androids of his time. Three years after that, he slew his timeline's version of Cell when the then-imperfect being tried to kill him. The alternate Trunks' final fate is unknown.
Trunks returned to the past (prior to his defeat of Cell of his timeline) and became involved in the battle with Bojack.