Microbiology and immunology

What is the main function of a pattern-recognition receptor in innate immunity?