Dragonball Online is set in the age 1000, 216 years after Goku went to train with Uub at the end of Dragon Ball Z. Over this time many unforseen changes have occurred in the universe. The Earth is now home to 3 new race: the Majin, the Namekians, and the Yardratians. The Majin are known to be the children of Majin Buu while the Namekians were forced to, once again, flee from their home planet due to unknown circumstances and take refuge on the Earth. Parts of the Earth have been terraformed to resemble that of Namek to make the Namekians feel more at home.
Two conflicts fuels the story behind Dragonball Online. First is with an organization known as the RP army which seems to be a recreation of the Red Ribbon Army and the second is a mysterious force known only as the Dark Eye. The Dark Eye's motives are currently unknown, but what is known is that they're attempting to go back through the history of the Earth and alter all of the major events involving Goku and the other Z Warriors.
The Dark Eye's meddling with time has caused a number of time leaks to open up all over the planet Earth. The character you play as is from an unknown Age that was unwillingly pulled into one of these time leaks and ends up in the Age 761 at the Kame House where you witness an encounter between Trunks and the Dark Eye. Trunks then takes you to the Age 1000 where you and he together try to preserve the Earth's history either by way of going through the time leaks or with the use of his Time Machine.
It's also worth noting that Dragon Ball Online completely ignores the events of Dragon Ball GT.