Bittorrent is a peer to peer networking system for sharing files. Bittorent is NOT illegal. It is 100% LEGAL to share files. What is illegal is sharing COPYRIGHTED MATERIALS, which is what may be INSIDE the file being shared. Sharing a file is legal, but if the file contains copyrighted materials, it then becomes illegal. What is illegal is sharing copyrighted materials, NOT the sharing of a file itself.
Whoever told you bittorent sharing of files is illegal is WRONG.