You should see your primary care doctor
, who is very capable of helping you dealing with this problem, which is called paronychia. Paronychia is an inflammation and infection of the skin of the nail folds on the sides of the nails. It is usually the result of an ingrown toe nail or trauma to the nail fold, but other factors that can contribute include poorly fitting shoes.
Most cases of paronychia can be treated conservatively by wearing well fitting shoes, daily soaking the feet in warm salt water, and applying a topical antibacterial ointment. However, it sounds like your case is more advanced and so you should talk to your primary care doctor. This is because many of these more advanced cases require lancing of the pus-containing pockets (with a scalpel after injecting some numbing medicine) in order to properly heal. Also if the inflammation and redness are significant, you may need a course of oral antibiotic medications to get the inflammation under control.
If the cause of these paronychia are ingrown toenails, you may need to see a podiatrist
to have those fix. But the first step is your primary care doctor to help you get the inflammation under control.