Meninges

The meninges are the membranes that surround and protect the brain and the spinal cord. In mammals, the meninges have three layers: the dura mater, the arachnoid mater, and the pia mater.
In the space between the arachnoid mater and the pia mater (called the "subarachnoid space"), there is cerebrospinal fluid (CSF). CSF is a special fluid which bathes the brain and spinal cord. The meninges and the CSF work together to cushion and protect the central nervous system (the brain and spinal cord).
Layers of the meninges
Pia mater
The pia mater (or "pia") is the layer of the meninges that is closest to the brain and spinal cord. It is a thin, delicate layer ("pia mater" means "tender mother" in Latin). The pia mater sticks very closely to both the brain and spinal cord. The pia mater is made of cells that fluid cannot get through. This prevents cerebrospinal fluid from reaching the brain.
The smallest type of blood vessels, called capillaries, go through the pia mater and bring the brain the things it needs, like blood and oxygen. The pia's capillaries also make up an important part of the blood-brain barrier. This is the brain's "security system." It controls what can leave the bloodstream and get into the brain's nerve cells, and what cannot.
The pia's capillaries are lined with cells that are packed very closely together. Only certain things can get through these cells and reach the brain. This helps block things like bacteria and some poisons from getting into the brain. It also lets in the things that the brain needs to survive, like glucose (sugar), water, and white blood cells (which fight infection).
Arachnoid mater
The arachnoid mater is the middle layer of the meninges. It is a thin, clear membrane that fits loosely over the pia mater. This leaves a space in between these two layers called the "subarachnoid space." ("Subarachnoid space" means "the space under the arachnoid.") Cerebrospinal fluid flows through the subarachnoid space.
One of the arachnoid layer's most important jobs is to cushion the brain. Like the pia mater, the arachnoid mater is made of cells that fluid cannot get through. Because fluid cannot get through either of these layers, the cerebrospinal fluid stays in the subarachnoid space and does not leak out. Having this layer of fluid helps protect the brain, like a car's airbag. Without this cushion, every time a person moved their head, their brain would hit the inside of the skull and would get hurt.
The arachnoid mater also has an important job in the blood-brain barrier. Blood runs through the dura mater, the last layer of the meninges. The arachnoid mater keeps blood from getting through into the cerebrospinal fluid. This is important, because if blood gets through the arachnoid mater into the cerebrospinal fluid, the brain and spinal cord can get irritated and infected. Like all parts of the body, the arachnoid mater needs blood and oxygen to survive. Small blood vessels bring these things to the arachnoid layer. However, the arachnoid layer prevents the blood from getting through to the cerebrospinal fluid.
The arachnoid mater is attached to the last layer of the meninges: the dura mater.
Dura mater
The dura mater (or "dura") is the layer of the meninges that is farthest from the brain and the spinal cord. It is a thick, protective layer. ("Dura mater" means "tough mother" in Latin.) The dura protects the brain from being scraped and hurt by the skull, which is very rough.
The dura mater has the largest blood vessels of all three layers of the meninges. The veins in the dura carry blood from the brain to the heart after the brain has used up the oxygen in the blood. The arteries in the dura carry oxygen-rich blood from the heart. These arteries split into the capillaries in the pia mater.
The dura also folds into the brain in four different places to separate parts of the brain, including the two cerebral hemispheres.
Mnemonic
Some medical professionals use a mnemonic acronym to remember the layers in the meninges and what order they go in. The mnemonic is: "The meninges PAD the brain":
Pia mater: closest to the brain and spinal cord
Arachnoid mater: middle layer
Dura mater: farthest from the brain and spinal cord
Problems with the meninges
Because the meninges do many important things for the central nervous system, problems with the meninges can be very dangerous. The most common problems with the meninges are caused by infections or bleeding in the meninges.
Bleeding problems
When blood vessels in the meninges break or are injured, those blood vessels will cause bleeding in the meninges. Bleeding in the meninges is a type of stroke called a hemorrhagic stroke. ("Hemorrhagic" means "caused by dangerous bleeding (hemorrhage)"). Bleeding in the meninges is very dangerous, because if enough blood builds up, the blood can squeeze or crush the brain.
Infections
The blood-brain barrier in the meninges' blood vessels protects the brain from most pathogens (things that cause infection). Because of this, infections in the brain are not very common. This is important, because antibodies - which the body's immune system makes to fight off infections - cannot get past the blood-brain barrier into the brain. Neither can most antibiotic medications. This means that when a person does get a brain infection, the body usually cannot fight off the infection on its own, and most of the medications that doctors use to kill infections cannot get into the brain to kill the pathogens inside.