See doctor. Vicodin may help, but I would see a doctor before "just taking it". If there is an infection vicodin will help the pain but will do nothing for the cause.
Not first choice. First thing is to find the cause - an injury, a dental abscess, an infection below the skin or many other causes. The first thing to use for pain would be over-the-counter medications like Acetaminophen (tylenol) or Ibuprofen (motrin, advil) in usual doses. If the pain continues, see your doctor! Opiate-containing medication like vicodin should be for when others don't work.