There is a small museum founded on 1955 within the territories of ancient city Troy, near the Dardanelles (present-day Turkey). The museum includes the remnants of the city and a symbolic wooden horse built in the garden of the museum to depict the legendary Trojan horse.
Based on this mythological reference, the term Trojan horse, in general, refers to an apparent gift that is not a gift at all.
So a computer virus is usually a Trojan horse, since the user seldom or never wants the virus to spread itself around. (On the other hand, if something spreads that's an important enough fact about it that it's best to call it a "computer virus" rather than just a "Trojan horse", just as "Look out for the tiger!" is much more appropriate than "Look out for the cat!".)
The prototypical Trojan horse is, for instance, a program called "SEXY.EXE" that is posted somewhere with a promise of "hot pix", but when executed erases all the files it can find and prints the message "arf, arf, I got you!".
See also Computer Security.