You ask about vaginal pH (the abbreviation stands for 'potential hydrogen,' a measurement of acidity). The scale for measuring pH is from 0 to 14, with a lower number meaning more acidic and a higher number meaning more basic. The normal pH of the vagina is 3.5 to 5.0. Being on the acidic end of the range means that the environment is unfriendly for unwelcome bacteria--and therefore more resistant to bacterial infections. There are a plethora of bacteria that belong in your vagina, the most predominant being lactobacilli. They produce lactic acid, resulting in an acidic pH and vaginal health.
A number of things can disrupt normal pH. Semen has a pH of 7 to 8, so after intercourse there will be a brief change in pH. Menstrual periods, with blood with a pH of 7.4, will also disrupt normal pH levels, and not so briefly; susceptibility to bacterial infections rises during menstruation. Douching can also disrupt healthy pH by flushing the healthy bacteria.
Perimenopause and menopause are major disruptors of pH, because the decline of estrogen causes the pH to rise (less acidic, more basic). This change is not brief at all; instead, it's the new normal. Not all women are sensitive to changes in pH, but some are; we're not sure why it varies from woman to woman. The most common infection related to the pH change is bacterial vaginosis (BV), caused by the bacteria gardnerella vaginalis, typically apparent because of discharge and odor. It's inconvenient, but easily treated with an antibiotic.
To avoid that infection or its recurrence, maintain healthy vaginal tissues and a healthy pH, which keeps the lactobacilli around to do their job. Vaginal moisturizers help; avoid douching; and if you have recurring issues, use a condom during intercourse to minimize the effects of semen.