Cholesterol is in every cell in your body. It's an integral part of your cell membranes, helping good molecules pass into cells while keeping others out. It's not well known, but most all of your cells-- and your liver in particular-- make a lot of the cholesterol you use to function (about 1,000-1,500 mg per day). The rest you get from food.
After waging a 30-year war against cholesterol, the government-- and even the American Heart Association-- are reversing their stance on this vital compound. A recent report from the US Department of Health's Dietary Guidelines Advisory Committee reversed its previous ruling on cholesterol, announcing that "cholesterol is not considered a nutrient of concern for overconsumption." 
Contrary to what we have read in the media for years, dietary cholesterol itself is not the bad guy. This post explains what cholesterol is, what the different types of cholesterol do, and how they help your body and brain.
Cholesterol keeps your brain running smoothly
Cholesterol is particularly important for cognitive function. Your brain makes up only 2 % of body weight but contains 25 % of the body's cholesterol! 
Why so much in such a small space?
Cholesterol helps your neurons communicate with one another.
Many neurons are encased fatty covers called myelin sheathes. Electricians insulate wire so that electricity can travel with less resistance. It's the same deal with your neurons. Myelin sheathes insulate your nerve pathways, allowing messages and signals to move much more quickly. Myelin is one-fifth cholesterol by weight, so eating plenty of cholesterol is crucial to maintaining your myelin and keeping your brain's signaling both fast and efficient.
Cholesterol deficiency is linked to a decline in cognitive function and memory, especially for anyone following a Western Diet (i.e., eating lots of carbohydrates and dutifully limiting fat and cholesterol). According to a 2011 study in the European Journal of Internal Medicine: "an excess of dietary carbohydrates, particularly fructose, alongside a relative deficiency in dietary fats and cholesterol, may lead to the development of Alzheimer's disease". 
Cholesterol is the building block for sex hormones
Cholesterol is the building block for every single known sex hormone. That includes estrogen, testosterone, progesterone-- the whole lot. Vitamin D is also essential for sex hormone production, and people who don't eat enough fat or cholesterol are often vitamin D deficient.
Cholesterol is also a key player in bile acid production. Bile acid helps your body regulate fat, cholesterol, and glucose metabolism.  It's also required for you to absorb fat soluble vitamins.
What exactly IS cholesterol? Why is it so controversial?
A common misconception is that cholesterol is a fat. Cholesterol is not a fat, although it travels through the bloodstream along with fats and it's found in the fatty parts of foods.
Actually, cholesterol is a type of alcohol called a "sterol." Sterols have two distinct parts: one that dissolves in water and one that dissolves in fat. The split allows sterols to travel in water-based compounds (like blood) while carrying fat-based products.
Cholesterol travels through the blood with packages called "lipoproteins", which are like little containers full of fats, proteins, and other nutrients (like fat-soluble vitamins such as Vitamin D). These nutrients won't dissolve fully in water, so they rely on lipoproteins to carry them through your system.
Cholesterol is controversial because it's one of the first things we could separate out of blood, so we've been studying it for a long time. It's been associated with all kinds of disorders, but the causal factors are still not determined. In other words, cholesterol can be a symptom, not a cause.
There is even an argument that cholesterol makes you stronger (you'll survive poisoning better and put on muscle more easily when you have more cholesterol!). High cholesterol in conjunction with inflammation is bad news for sure-- inflammation is a problem, but it's harder to measure than cholesterol, and harder to control.
When we figured out cholesterol wasn't a problem, the debate shifted to whether one type of cholesterol or another was the main problem, leading to the HDL vs. LDL debate.
What's really going on in the HDL versus LDL debate?
Lipoproteins initially form in the intestines, where they gather and bind fat, cholesterol, and other nutrients. After they load up they move into the bloodstream to deliver those nutrients to various tissues.
During their journey, lipoproteins change form. There are a few different types, but the two most famous ones are:
"high-density lipoprotein", or HDL
"low-density lipoprotein", or LDL
The media and the mainstream medical community like to talk about LDL as the "bad type of cholesterol", and HDL as the "good type." The common argument: LDL delivers cholesterol to tissues (supposedly a bad thing) while HDL takes cholesterol from tissues (supposedly a good thing).
Labeling lipoproteins as "good" and "bad" is both imprecise and misleading.
This carelessness with language wouldn't be so bad if it didn't have the consequence of causing people to avoid consuming cholesterol altogether-- driving them away from healthful, fat-rich animal products and toward an inflammatory, carbohydrate-rich diet based mostly on flour, sugar, and toxic industrial (but cholesterol-free!) vegetable oils.
So if cholesterol isn't the cause of the cardiovascular problems far too common in the Western world, then what is?
Cholesterol itself does not cause heart disease: oxidized PUFAs do!
It's not true that a lot of cholesterol in the blood causes heart disease. It's actually from the deposit of cholesterol from LDL particles inside artery walls, and that happens as a result of inflammation.
It matters if the LDL particles are carrying a lot damaged, oxidized fats, and that is more likely to happen if you eat a lot of polyunsaturated fats, or PUFAs, that are poorly processed and found in vegetable oils like soybean, corn, canola, cottonseed, and the like.
PUFAs are very fragile. They're susceptible to oxidation by free radicals, and having too many of them (in cell membranes, LDL particles, and elsewhere) can trigger out-of-control inflammation and disease.
So now the question becomes not, "How much LDL cholesterol do you have?" but, "How oxidized is the LDL cholesterol you have?".
The myth about cholesterol and plaque buildup.
Also important is how long the damaged particles stay stuck where they don't belong. Once inside the artery wall, these oxidized LDL particles attract macrophages and other well-intentioned white blood cells hoping to clear the obstruction; unfortunately, though, the white blood cell response leads to runaway inflammation and the production of a hard "plaque" that blocks blood flow.  Because cholesterol is stuck in these plaques, it's often implicated as the "cause" of heart disease. But if you assay them, you find PUFAs.
Damage to the artery, which comes from inflammation and oxidized LDL, is the root cause of arterial plaque LDL buildup. HDL particles, which contain a good deal of the antioxidant vitamin E, can reduce the oxidation of particles in their place, thus lessening the inflammation and protecting the artery from plaque formation-- which is why higher HDL levels predict a lower risk of heart disease.
HDL's good deed is not so much that it removes cholesterol from these plaques. More accurate is that HDL protects and repairs LDL and fats from oxidative damage.
Boost Your Cholesterol Radar.
One way to combat plaque formation and cholesterol-based inflammation is to eat a diet that's rich in undamaged saturated and monounsaturated fats. Just as important is to avoid the poor quality PUFAs found in processed and packaged foods and low-quality restaurant meals!
Following a diet rich in high-quality, oxidation-resistant fat will raise HDL and reduce oxidized LDL (shameless plug: get the Bulletproof Diet Roadmap). It will also lessen oxidative damage and system-wide inflammation. Consume lots of coconut oil, grass-fed butter and animal fats from healthy animals (where you'll also find cholesterol), fish, and avocado, and stay away from corn, soybean, vegetable, canola, and cottonseed oil and the like.
It is time to repair cholesterol's good name once and for all. Consider too that the federal government-- an entity harshly critical of cholesterol-containing foods for most of the last century-- recently changed its mind. The government of Sweden went even further (perhaps because Sweden's government is on the hook for the cost of healthcare) and is recommending a diet high in saturated fat. (quality sources, not the processed food prevalent in our culture)