There are a couple of possibilities here. The most likely is something called folliculitis. Folliculitis is a infection of the base of the hair shafts, caused when bacteria invade and cause redness, swelling, and whiteheads. Folliculitis is usually minor and self limited (meaning it will go away without treatment). It is usually caused by irritation of the skin and hair shafts which allows entry of the bacteria; common causes are shaving, sweating, and chafing from fabric. Usually it will clear up in a few days with simply good skin hygiene. You also may wish to wash with an antibacterial soap. If it does not clear up, if there is worsening swelling of the spots or pain or fever
, you will need to see your doctor
A similar rash is prickly heat rash. Like folliculitis, it causes redness and whiteheads to form. However, it is caused primarily by plugging up of the sweat glands in the skin, and it is usually caused by overheating of the skin and excess sweating. It is usually more itchy than folliculitis. It will usually clear up just by keeping the skin clean and dry.
As always, if the rash in not improving with these simple measures, you should see your primary care doctor
as soon as possible.