Pap smear test??

What is Pap smear test? And who should get it done. If one is not sexually active than also is it necessary to undergo this test?