This is done by breaking down large files into many bits and later connecting those bits together. Torrenting works by using decentralized servers to download files, and each participant in this file-sharing activity is engaged in downloading and uploading files. That is to say, all Torrent users rely on each other to carry on the file transfer activity. Essentially, you are sharing the file being downloaded while it is still in the process of downloading, without having to wait for the whole file to download.
A torrent can be distributed using a hash; often called a magnet link or a TORRENT file.
If the user downloads a torrent and the torrent client starts uploading the file for other people to download, the file the downloader is uploading which is available for other users to download from is a seed.
A peer is someone downloading the file from a seeder and does not have the full file yet.
If a user downloads a torrent but refuses to distribute it then the file is called a leech (Maybe the user is called a leech.).
A swarm is a group of people who are sharing and downloading the same toerrent.
It is a server that tracks the users of the torrent and helps to locate each other for data transmission.
A client is a program that recognizes the torrent file or the magnet hash and does the downloading and uploading task.
Indexers are the websites that collects and stores a huge number of torrents. It's where the people search for the torrent they require.
Since this is the most asked question, I am just going to tell you that torrenting isn't illegal. But....... There's a but. Downloading and distributing illegal (Copyrighted) files via the torrent is illegal. Torrent is just a file transfer protocol.