Trunks is the son of Bulma and Vegeta, and thus the heir to the Capsule Corporation and the throne of space warriors.
In the future, Android 17 and Android 18 created by Dr. Gero unleash a fatal attack on all earthlings: Goku died of an incurable disease, and all other Z-warriors were killed one after the other. The only surviving warriors were Gohan and Trunks. The latter decides to travel back in time to try to change the course of events and avoid the tragedy that he witnessed.
The alternate future story is summarized in the OAV: The History of Trunks
As he comes back in time, Trunks manages to save the life of Goku and changes history at the same time, therefore creating a second future. When the young space warrior arrives, he discovers that the attack of the cyborgs has not yet occurred. During the terrible fights against the cyborgs and Cell, Trunks manages to acquire extraordinary strength, both physical and in terms of character. Trunks therefore finally manages to defeat the evil cyborgs as he returns to his original future.