To my knowledge, all of the PCR-based tests that have been authorized for diagnostics use fluorescently labeled reporter probes specific to the the SARS-COV-2 viral genome. In real-time PCR, the intensity of this fluorescent signal is measured (spoiler alert) in real time, after each amplification cycle. The fluorescent signal increases with the amount of the target sequence present in a reaction. If the signal exceeds a certain baseline threshold before a certain number of PCR cycles, the test is considered positive for that target. It really is as simple as that, but a lot of work goes in on the development and validation of these threshold cutoffs to ensure they are sufficient for sensitive detection.
What identifies the readout as unique to this virus is the design of the probes and the primer sets that go with them. These are designed to be highly specific to a given target, and are validated in silico against existing sequence databases, and also empirically against closely related organisms, or just against other things that might be present in a specimen. They should also target conserved regions of the genome that are unlikely to mutate. Most of the tests I have seen use at least two different SARS-CoV-2-specific probe targets, and at least one amplification control (often targeting a conserved human gene) to ensure that the reaction enzymes are functioning properly. But the specific regions of the genome that are targeted can vary between different tests.
Using real-time PCR saves clinical lab techs the time and effort of making gels and running the amplified PCR products out on the gel, like those in the second example you posted. This not only improves the turnaround time for testing results, but saves countless work hours for the clinical labs processing these tests, especially when you consider the scale of how many tests are being processed right now.
As with any nucleic acid test, a positive result can only indicate if the target is (or was) present. It does not provide information to clinicians about whether it is actively replicating or even infectious. But in general, this kind of testing is highly sensitive and specific when properly designed and validated.