During a pelvic exam, what kind of things is the doctor usually testing for?

Depends on age. Routine gynecologic tests for cervical cancer and sexually transmitted infections (gonorrhea and chlamydia) are the most common tests under age 25, over age 25 it is usually just a pap smear. Swabs may be obtained to rule out infections if an unusual discharge is noted.
Abnormalities. The doctor will check for 1) vulva problems like herpes of thinning of the vulva, 2) vaginal problems like discharge due to yeast or bv, 3) cervical problems like precancer, cancer, or chlamydia, 4) uterine problems like fibroids, 5) tube and ovary problems like cancer, cysts or tenderness. These are only a few of the many things the doctor is looking out for during your exam.