The torrent files themselves only contain information hashes that verify the real file you're going to download. So just to make it clearer, .torrent files will seldom contain viruses.
The real threat though are the files that you actually download. Those are the things that may contain viruses and other undesirables. So before opening them when downloading is complete, run those files through anti-virus and spy/malware detection software.