How does a plagiarism detector work

How does a plagiarism detector work