How PCR can be used to detect the presence or absence of SarsCoV2

PCR, as described in the investigative manual, is a very important and commonly used procedure in biotechnology and biochemistry labs.  In 2020 a new virus, SarsCoV2, caused a world-wide pandemic.  One of the diagnostic tools used to detect if a person was infected by this virus was (and is) PCR.  Describe how PCR can be used to detect the presence or absence of SarsCoV2. Is this method 100% reliable?