How do primers anneal to ssDNA?
No enzyme is involved in base-pairing (annealing).

This does happens by chance, but the chances are governed by stoichiometric considerations. 

The main such consideration is that the (low molecular weight) primers are added at a high concentration (greater than that of the DNA) and therefore have a greater chance of encountering the appropriate region of the DNA than its complementary strand does. (Reannealing of the denatured DNA strands can occur, but not over the time period of PCR.)