Tool instruments byte code with extra code to measure which statements are and are not reached.
Test suite is run. Data is collected.
Data is analyzed to generate reports (often in HTML) showing line by line what is and is not reached.
Any line that isn't reached isn't being tested.
I'm going to use JUnit 3.8 in the examples, but this approach is normally test framework agnostic.
Does covered == tested? A necessary but not sufficient condition.