Trojan horse is an insider attack where an innocent computer program contains code to perform unexpected/undesirable function.
This unexpected/undesirable function might be modifying, deleting or encrypting the user's files, copying it to a place, from where the cracker can retrieve it later or even sending it to the other cracker or a temporary safe hiding place via electronic mail (e-mail) or file transfer protocol (FTP).
To run the trojan horse on anyone's computer system, then the person who make the trojan horse to attack other's computer system, has to get a program carrying the trojan horse executed first.
Therefore, to execute the trojan horse carrying program, one way is, place the program on the Internet as free, exciting new popular game, amazing viewer, all in one software, and something other to attract the people's attraction to download that trojan horse carrying program.
So that, the user run the software on his/her computer system after downloading.
Now, on running that program, the trojan horse procedure is called and can do anything such as delete files, modify files, retrieve some important information etc.