and how do they know a file is illegal?
You know that displaying your avatar in your browser is equivalent to downloading (action consisting of transferring a data from a remote computer to yours) an illegal file? you don't have permission to use this copyrighted/registered Intellectual Property.
They can't detect what's going through, they can see the IP you connect to and protocol you are using (http, torrent, nntp, ftp, etc.)
For them to "know" that the transmitted content is illegal, they would need a huge database of illegal content and compare them to every user's data transfer...
is that limited only to full content, on only to few part of it? a part could be the same data as another legal content.
What could be used is hiring a private company to do their work, tracking all torrent websites and marking all tracker's IP as suspicious, etc.
That's what was proposed in France (Hadopi). it never worked. it cost millions € for nothing.