Cell walls are only found in plant cells and are used primarily to create structure, but cell membranes are found in all cells. The bulk of the membrane is composed of a double layer of lipids called the lipid bilayer. Inside the bilayer there is a layer of cholesterol to keep the membrane fluid. Imbedded in the membrane are various proteins which provide channels for specific molecules to pass through, making the membrane semi-permeable.
The outside of a cell in many kinds of cells is covered with a rigid structure called the cell wall whether you're a plant, a fungi, many of the bacteria as well as the protest group called algae. Now the cell wall is made out of a material called cellulose or chitin or peptidioglycan. There's others out there. Some of the algae even use glass, silicon dioxide as their cell walls but in general they all provide structure and support for the cell that's inside of that cell wall.
Let's take a quick look at this plant cell over here and you can see the thick outer cell wall that helps keep the cell inside protect it plus, since they don't have skeletons like you and I do, if they didn't have this rigid structure outside, they would just collapse and instead of having tall trees, you'd just have little blobs of green goo. Now if we go back here, the cell membrane often referred to as the plasma membrane, is what you find immediately underneath that cell wall, and it's made up of something called a phospholipid bilayer which I'll discuss later. Now phospholipid bilayer is one of the key things that allows the cell membrane or plasma membrane to control what can come in or out of the cell. In fact because of some of other things that are embedded within the phospholipid bilayer, it's also able to change what it can allow in from moment to moment which gives it not just the semi-permeable nature of the phospholipid bilayer but it's actually a subset of that called a selectively permeable barrier.
Now, another thing that is caused by not the phospholipids but some of the other molecules that are part of the membrane is that it's involved in cell to cell communication. So again if we take a look at our plant cell here, here's the cell wall. Immediately underneath that is the thin little phospholipid bilayer. Now it's called a phospholipid bilayer because this structure here and this structure here, each of them is a phospholipid and you see one, two layers, duh.
Now, a phospholipid is a special kind of lipid or a fat molecule and it has one end that has a phosphate head. Phosphate is an ion which means has a strong negative charge. These little wiggly bits down at the end are the two fatty acids tails, they're called sometimes. I've often thought they look like little legs of some guy wearing a swim vest and just kind of floating around in the water. These legs are the fat part and fats as you may have seen if you've ever had to do the dishes, fats greases don't mix with water. So these here are hiding from the water that's on the inside and outside of the cell. I've often thought of a phospholipid, the phosphate here which can interact with the water and the fatty acid tails that can't, it's kind of like you and your two younger siblings. You're awesome, you're cool. Everybody wants to interact with you, everybody being the water. You can hydrogen bond with them as you interact with them at a party.
Your younger siblings, nobody wants to interact with them and they don't really care about interacting with anybody else. They just want to sit there and look at their Pokemon cards or whatever it is that they're into. So this phosphate head interacts with the water, the Pokemony down here doesn't and what you wind up doing is if you wind up going to a party and your parents shackle your younger siblings to you, you'll hide them behind you. And you may form a wall of older siblings with the younger siblings hiding behind them and in fact you could form this double layer here. Anything that tries to get through, has to be able to interact with the fatty acid tails and not too many chemicals can. You'd have to be uncharged and generally you'd have to be small. And most molecules can't do it. Which is why this is impermeable to most molecules, that means that they can't penetrate through. Some molecules can, like oxygen gas and carbon dioxide gas. They can permeate straight through it because sometimes some things can other things cannot, that's called semi-permeable.
Now, I mentioned previously that the cell membrane is actually selectively permeable because it can change what is allowed in and what can't come in. This is what your cell membrane would actually look like. Here these purple globs represent protein that are embedded within the membrane. Here we see our phospholipid bilayer. These little orange things are steroid or cholesterol molecules that help, give some rigidity to the membrane. And they're flowing around. This is sometimes called the fluid mosaic model because it's fluid and it's made up of small pieces much like mosaic.
Now, these proteins, some of them are pumps or channels. Pumps like the name implies can pump things in or out of the cell if it spends some energy. Channels have little doors that they can open or close, open when they want something to come in or out close when they don't.
Now some of these other things that are attached are sugarcanes, polysaccharides that, especially when they attached to proteins, they're called glycoproteins, when they're attached to some of the phosphate heads here, they're called glycolipids because a phospholipid is a kind of lipid. These are what I was talking about earlier when we talked about how cell membranes are involved in cellular communication and recognition.
Your white blood cells for example are constantly investigating all the cells of your body, using these other molecules, these proteins and glycoproteins and glycolipids to recognise what cells belong in your body, which ones don't. And for example if a cell is trying to communicate with another cell let's say a neuron in your brain is trying to communicate with another neuron to say hey, I thought of something. It does it by releasing chemicals through the membrane which go to the next cell and interact with proteins on its membrane.
So there you go. The cell wall is on the outside of the cell and it's made of rigid structures like cellulose or chitin and it gives protection and structure to the cell. Inside the cell wall, you'll have the phospholipid bilayer of the plasma membrane. It's made out of these phospholipids plus a bunch of other chemicals such as proteins.