Adults with lactose intolerance are not able to manufacture sufficient lactase (a digestive enzyme) to break down down the milk sugar into its two moieties: glucose and galactose. Each of these simple sugars can be absorbed directly into the blood stream, and utilized by your body's cells. The undigested lactose attracts water as it travels down your GI tract.
When the lactose hits the large intestine, the bacteria there are able to digest it, albeit inefficiently. This generates considerable gas, which accompanies the diarrhea.
Allergies are reactions of your immune system to foreign substances--usually proteins. Lactose is a carbohydrate.
Lactose intolerance has absolutely nothing to do with your immune system. Of course it's possible for a person to have both lactose intolerance and allergies to the proteins in milk.