Okay, too much information. So, C. diff often occurs in hospitals but not for the reasons you may be thinking. These infections happen because of antibiotic treatment usually for some other infection. Most often a class of antibiotics called quinolones is the medicine that leads to C. diff infection. These drugs kill the bacteria of the main infection that probably brought the patient into the hospital in the first place but also causes the C. diff to overgrow leading to this infection instead.
Like the other gram-positive clostridia (the more interesting ones in my opinion), C. diff can sporulate. Under harsh environmental stress they can go metabolically dormant and become a spore in which they wait until the stressor goes away. They are also resistant to antibiotics in this state giving an explanation as to how they can selectively survive a regimen of antibiotic therapy for a different infection.
C. diff causes diarrhea and a dangerous condition called pseudomembranous colitis. This happens after C. diff enters the colon. The bacteria is initially ingested and is usually killed immediately by the harsh stomach acid. This is good and prevents an infection before it can begin. However, if the bacteria are in a spore form, they can survive the stomach and enter the small intestines. Here the body does what it normally does in the process of digestion. The duodenal cells of the small intestine secrete cholecystokinin (entomologically defined as "A chemical that moves the gallbladder;" It stimulates the gallbladder to release other digestive good-ness) and bile salts. Normally, the bile salts kill any of the lucky bacteria that survive the stomach and enter the intestine. But in the case of C. diff the bile salts stimulate the spores to germinate into the replicative form. Now a growing and metabolically active bacteria the C. diff moves throughout the intestinal tract.
Here the bacteria secrete two toxins called Toxin A and Toxin B (oh you clever scientists...) Toxin A is an enterotoxin while B is a cytotoxin. These terms nearly mean the same thing but "enterotoxin" is more specific to cells of the GI tract. Anyway, Toxin A and Toxin B kill the cells of the intestinal tract by the inactivation of a set of proteins called the RhoGTPases. I think I mentioned them somewhere before, but if not then the only thing worth mentioning about these proteins is that they function to maintain the cell membranes and are used as regulators of other molecular stuff we're not too interested in. Toxin B specifically depolymerizes the host cell actin which destabilizes the mebrane which will inevitably lead to cell death. It also causes the cells to lose their association with each other. These cells or usually very tightly associated with each other in order to keep a strong barrier between the cells and the lumen of the intestines. By breaking these associations, the lumen becomes more "leaky" and the result is diarrhea from the inability to absorb material.
These toxins cause the cells to burst and release their contents among which are enzymes that function in digestion. The release of these enzymes leads to destruction of the surrounding tissue which then brings in inflammatory cells to clean up the mess. The problem with the inflammatory cells is that...they're inflammatory! So now the patients will have inflammation in the stomach which also leads to diarrhea.
If the infection occurs in the colon then the inflammation and presence of the immune cells results in a mass of dead cell debris, bacteria, and other fun things leading to a condition called psuedomembranous colitis seen right. Basically, the colon becomes inflamed and covered by these psudeomembranes. The danger is when the psudeomembranes rupture and spill the colonic contents into the abdomen. This can lead to sepsis and death.