A "trojan" isn't always a virus. It's something dressed as something else. Beware Greeks bearing gifts, or Geeks baring Gifs. c.f. Story of fall of Troy.
They existed in mainframe days, a free 9 track tape with a demo would actually also do something else.
A Trojan might have any purpose. It usually needs to be explicitly run. It might be presented as "click here to install this codec you need", or as legitimate app.
A "virus" is code that replicates itself from the computer it somehow got on, to another computer via any method. Amiga should have warned MS that "autorun" CDs on Win95 was rather ideal for a virus replication medium.
Malware can obviously combine Trojan and Virus techniques.
A root kit is a way of hiding malware, it may be legitimate such as special kind of device driver to emulate some particular hardware, or make a mounted ISO look like a CD/DVD to anti-piracy software.
I suspect wikipedia, bing, google, yahoo answer the question.