The two versions sit next to each other with line numbers. Removed lines are red on the left, added lines green on the right, and an edited line shows both sides with only the changed words highlighted.
The comparison is on the text itself, so it does not matter whether it is Python, JavaScript, Java, Go, C++, PHP or something else. Long runs of identical lines fold away so you only read the parts that changed.
If one version has been run through a formatter, tick Ignore whitespace so re-indentation stops drowning out the real edits.
Reviewing a change before you commit it, comparing your file against a colleague's, working out what a copied Stack Overflow snippet changed, and checking a file against a backup after something broke.
Yes. Proprietary source code never leaves your machine — the comparison runs in your browser, with no upload and no server involved.