A Trojan horse in computing is is a piece of malware or malicious computer program that misleads users of its true intent. Trojans generally require some form of social engineering in order to spread. An example could be a user tricked into executing an email attachment disguised to appear not suspicious or a fake ad on a website.
The payload is not specific and therefore can be anything. In most cases, they are used as backdoors allowing a bad actor to have unauthorized access to a computer network.
The term for this type of malware is derived from the Ancient Greek story of the deceptive Trojan Horse that led to the fall of the city of Troy.