Microorganisms — which have a terrible reputation — have been around for billions of years.
All the information that we now have, including the fossils that have been discovered, suggest that life on Earth began 3.5 to 4.1 billion years ago. The oldest known organisms are called archaea. Tehy used to be considered bacteria, but are now classified as one of the three domains. The other two are bacteria and eukarya, which include fungi, animals, and plants. Just to put things in perspective, the oldest remains of Homo sapiens are "only" about 300,000 years old.
Through the ages, different species began relying on particular survival strategies, like predation or parasitism. But not all of them are "bad". Many different species settled into interactions that either benefit both species or help one, without causing any harm to the other.
The flora in our guts
The first part of the human body that comes to mind when talking about microorganisms are the intestines. It is suggested that a newborn forms a certain type of microflora in the intestines during childbirth, and this continues to go on until death. Depending on a person's diet, place of residence, and the age, different types of microorganisms may live in our intestines, but those microorganisms are equally important for several reasons.
First of all, we wouldn't be able to digest all of the food we ingest without their help. For instance, let's talk about cellulose. Cellulose is a molecule found in plants (among others) that we are not able to digest, since we do not secrete an enzyme to do so. But some bacteria living in our large intestine can produce that enzyme, which breaks up the large chain of cellulose into smaller particles that we are able to digest. Some animals (ruminants), whose diet consists mostly of plants, have evolved in such way that they have a separate organ for those bacteria to live in and help them digest the fibers: the rumen.
Secondly, our own "friendly" microorganisms protect us from the bad ones just by being there. This happens in several ways. First of all, a large number of "good guys" form a first line of defense by themselves. Microorganisms constantly compete for the resources they need to survive and reproduce. If the bacteria that can cause disease don't have enough resources, they will die. The other way of protecting us is by secreting antimicrobial substances that kill the unwanted microorganisms in our gut. In fact, our own immune system has a way to differentiate "good" bacteria in the gut from "bad" ones.
Of course, some pathogens (such as Salmonella) have ways of overriding these defense mechanisms and causing disease.
This includes the signals coming from microorganisms. And the microorganisms in our guts can affect our mood, too. While the explanations for these phenomena are incredibly complicated, it is enough to say that, for instance, Candida and Escherichia can produce serotonin. Many of the pathways are yet to be explained, but depression, anxiety and different mood disorders have been connected to imbalances in gut flora.
The lady parts
Vaginal flora is essential to a woman's health.The main genus of bacteria living in the vagina is Lactobacillus. These bacteria produce lactic acid, which lowers the pH of the environment. The acidic pH prevents other bacteria from living and reproducing there, such as gonorrhea, E. coli, and S. aureus. Some studies even suggest that a healthy vaginal flora can lower the risk of contracting HIV (but be sure to use protection either way). The useful bacteria also produce hydrogen-peroxyde, which is deadly to other bacteria, as well as bacteriocins, toxins that target specific bacteria.
Most of our organs have a natural microflora. The skin, the eyes, the oral cavity, even the placenta have their own sets of microorganisms — which either benefit us in some way, or live there peacefully. But, some of those organisms may cause certain diseases if the balance is disrupted.
If things do get out of balance, there are ways to fix them. Probiotics are the first thing that comes to mind if you want to restore your intestinal flora, especially after the use of antibiotics (since the antibiotics kill both the "bad" and the "good" bacteria, and diarrhea after a course of antibiotics is the result of a lacking normal gut flora), but the effectiveness of the probiotics has been disputed. The other, more extreme way of fixing patients' gut flora is through a fecal transplant. This basically means that doctors take feces from a healthy person, and insert them into the patient's intestines, establishing normal gut microbiome. As for vaginal flora, probiotic tampons are available on the market.