The structure and function can be described both as gross anatomy and at a microscopic level. The intestine is divided into two parts: The small intestine and the large intestine.  People will have different sized intestines according to their size and age. The lumen is the cavity where digested food passes through and from where nutrients are absorbed. Both intestines share a general structure with the whole gut, and are composed of several layers. Going from inside the lumen radially outwards, one passes the mucosa (glandular epithelium and muscularis mucosa), sub mucosa, muscularis externa (made up of inner circular and outer longitudinal), and lastly serosa.
The general structure of the intestinal wall
Along the whole length of the gut in the glandular epithelium are goblet cells. These secrete mucus which lubricates the passage of food along and protects it from digestive enzymes. In the small intestine, villi are vaginations (folds) of the mucosa and increase the overall surface area of the intestine while also containing a lacteal, which is connected to the lymph system and aids in the removal of lipids and tissue fluid from the blood supply. Micro villi are present on the epithelium of a villus and further increase the surface area over which absorption can take place. Pocket-like invaginations into the underlying tissue are termed Crypts of Lieberkühn. In the large intestines, villi are absent and a flat surface with thousands of crypts is observed.
Underlying the epithelium is the lamina propria, which contains myofibroblasts, blood vessels, nerves, and several different immune cells.
The next layer is the muscularis mucosa which is a layer of smooth muscle that aids in the action of continued peristalsis and catastalsis along the gut. The sub mucosa contains nerves (e.g. Meissner's plexus), blood vessels and elastic fibre with collagen that stretches with increased capacity but maintains the shape of the intestine.
Surrounding this is the muscularis externa which comprises longitudinal and circular smooth muscle that again helps with continued peristalsis and the movement of digested material out of and along the gut. In between the two layers of muscle lies Auerbach's plexus.
Lastly there is the serosa which is made up of loose connective tissue and coated in mucus so as to prevent any friction damage from the intestine rubbing against other tissue. Holding all this in place are the mesenteries which suspend the intestine in the abdominal cavity and stop it being disturbed when a person is physically active.
The large intestine hosts several kinds of bacteria that deal with molecules the human body is not able to break down itself. This is an example of symbiosis. These bacteria also account for the production of gases inside our intestine (this gas is released as flatulence when eliminated through the anus). However the large intestine is mainly concerned with the absorption of water from digested material (which is regulated by the hypothalamus) and the re absorption of sodium, as well as any nutrients that may have escaped primary digestion in the ileum.
Gastroenteritis is an inflammation of the intestines. It occurs more frequently than any other disease of the intestines.
Intestinal Pseudo-Obstruction is a syndrome caused by a malformation of the digestive system, characterized by a severe impairment in the ability of the intestines to push and assimilate. Symptoms include daily abdominal and stomach pain, nausea, severe distension, vomiting, heartburn, dysphagia, diarrhea, constipation, dehydration and malnutrition. There is no cure for intestinal pseudo-obstruction. Different types of surgery and treatment managing life threatening complications such as ileus and volvulus, intestinal stasis which lead to bacterial overgrowth, and resection of affected or dead parts of the gut may be needed. Many patients require parenteral nutrition.
Appendicitis is inflammation of the vermiform appendix located at the caecum. This is a potentially fatal disease if left untreated; most cases of appendicitis require surgical intervention.
Coeliac disease is a common form of malabsorption, affecting up to 1% of people of northern European descent. An autoimmune response is triggered in intestinal cells by digestion of gluten proteins. Ingestion of proteins found in wheat, barley and rye, causes villous atrophy in the small intestine. Lifelong dietary avoidance of these foodstuffs in a gluten-free diet is the only treatment.
Diverticular disease is a condition that is very common in older people in industrialized countries. It usually affects the large intestine but has been known to affect the small intestine as well. Diverticulosis occurs when pouches form on the intestinal wall. Once the pouches become inflamed it is known as diverticulitis.
Endometriosis can affect the intestines, with similar symptoms to IBS.
Bowel twist (or similarly, bowel strangulation) is a comparatively rare event (usually developing sometime after major bowel surgery). It is, however, hard to diagnose correctly, and if left uncorrected can lead to bowel infarction and death. (The singer Maurice Gibb is understood to have died from this.)
^Maton, Anthea; Jean Hopkins, Charles William McLaughlin, Susan Johnson, Maryanna Quon Warner, David LaHart, Jill D. Wright (1969). Human Biology and Health. Englewood Cliffs, New Jersey, USA: Prentice Hall. ISBN0-13-981176-1.