Smear test?

My doctor advised me to get a smear test, I watched a video on what it is and I'm actually scared to get it done. Does it hurt? Is it necessary to get it done?