Put a drop of food coloring into a bowl of water, and watch what happens. The food coloring spreads out, and over time becomes evenly distributed throughout the water. What causes the water and food coloring to mix? The temperature. After you discount the initial force of the food coloring being placed into the water, you are left with the random motion within the solution. What we experience as heat is the motion of the atoms and molecules in a substance. Because the water and food coloring molecules are in constant motion, they will eventually mix together. This is how diffusion works. A single substance that's able to move freely will distribute itself evenly throughout another substance (or combination of substances) due to nothing more than a temperature above freezing and the passage of time. The warmer the substance, the faster the diffusion.
From our vantage point, diffusion may seem like a haphazard way to bring molecules together. It takes a long time for the food coloring to completely spread out through the water, and there's no way to tell which direction it will go first. But over the very small distances within a cell (or across it's membrane), diffusion works very effectively. Chemical reactions don't happen until particles come into contact with each other, and the cell uses diffusion to make that happen. Diffusion plays an important role in many of the cell's critical processes.
When the food coloring is evenly spread throughout the bowl of water, it reaches a state of equilibrium. But what would happen if we divided the bowl into two compartments, separated by a screen that lets water through, but not the food coloring? If we drop food coloring into one compartment, it will reach equilibrium in that compartment, but won't spread to the other side. The water is able to pass through the screen, however, so you would think that the food coloring would push some of the water to the other compartment so that the fluid levels would be the same on both sides. But that's not what happens. By adding food coloring to the water, you dilute it. You now have a lower concentration of water in the food coloring compartment than you have in the pure water compartment. Diffusion takes over at this point, moving water from the highly concentrated compartment into the food coloring compartment, even though the fluid level is already higher there. If the screen is flexible, it will bulge into the pure water side in order to equalize the fluid levels. If not, then the fluid levels (and pressures) will remain unequal.
Diffusion depends on the free flow of substances in a solution. If one substance can flow freely, but the other can't, you have a special case of diffusion that's called osmosis. If you replace the bowl of water with a multi-celled organism (plant or animal), replace the screen with cell membranes, and replace the food coloring with proteins, fats, and all of the other molecules that are necessary for life, you'll begin to understand how the cell moves things around. Water flows easily in both directions through a cell's membrane, but many other biologically important substances have a tough time or can't get through at all. The cell has channels it can open and close to let specific substances through via diffusion. It also has pumps that actively push some substances back out into areas of higher concentration (against diffusion).
Cell membranes are flexible, so they swell up or shrink under the effects of osmosis. If the pressure imbalances become too great, animal cell membranes can burst. Plant membranes, however, are surrounded by sturdier cell walls, which keep their membranes from bursting. Instead, they use the internal pressure to strenghten the structure of their leaves. That's why leaves wilt when plants don't get enough water. The water diffuses out of the cell's interior into the dehydrated extracellular spaces.
Cells depend on diffusion and osmosis to perform many biological processes, so they never want a state of equilibrium to exist across the cell's membrane. The semi-permeable nature of the cell membrane maintains uneven fluid pressures through osmosis, and active pumps keep the concentration levels of some substances (most notably ions) out of balance. The cell maintains an imbalance of ion concentrations on opposite sides of the membrane in order to create an electrostatic charge across the membrane. To see how the cell maintains these conditions, let's look at how it manipulates uneven concentrations of sodium, chloride and potassium ions across a nerve cell's membrane in order to transmit electrical signals.
The interior of a cell is a crowded place compared to the spaces between the cells. Both are filled with water, but the inside of the cell is packed with all of the molecules (sugars, fats, proteins, energy carriers, ect) necessary for it to maintain it's biological processes. This results in a situation where water is more highly concentrated on the outside of the cell, than it is on the inside. Since the cell's membrane lets water pass through, but blocks the movement of many other molecules, water moves into the cell to spread itself out (equalizing it's concentration, in a process called osmosis). Since most of the non-water molecules inside the cell can't move out on their own, the pressure inside the cell becomes greater than the pressure outside the cell due to the buildup of water. As the pressure differences increase, the cell swells in size. If the pressure becomes too great, the cell can burst.
Animal cells control this imbalance by pumping three sodium ions out of the cell, and two potassium cells into it, using a sodium/potassium pump that's powered by ATP. This does three things. First, because it pumps out more ions than it pumps in, it dilutes the water outside the cell. This decreases the differences between water concentrations across the membrane, which slows down the diffusion of water into the cell. Secondly, it makes the electrical charge more negative inside the cell relative to the outside. Even though sodium and potassium ions are both positive, three sodiums are pumped out for every two potassiums that are pumped in, creating a net positive charge outside the cell. Finally, because of this pump, most of the sodium is outside the cell, while most potassium is inside the cell, which sets the cell up for signal transmission.
Making this molecular balancing act even more complicated, Chlorine (a negatively charged ion) is located in higher concentrations outside the cell. It can't diffuse through the membrane (and into the cell) on it's own. It needs the cell to open a chlorine ion channel to get inside. Chlorine helps balance out the negative electrostatic charges that build up on the opposite side of the membrane due to many of the non-ionic molecules that crowd the inside of the cell. Proteins, for example, have a net negative charge.
You don't want the charges balanced completely, though, or the cell won't be able to work properly. The cell maintains electrostatic charge imbalances across the membrane so that the inside of the cell is -70mv (millivolt) more negative than the outside of the cell (it's "resting state"). The cell also maintains concentration imbalances across the membrane for both potassium and sodium so that the -70mv resting state can be overwhelmed quickly in order to transmit electrical signals (This is how we move our muscles and think).
Cells control the movement of sodium, potassium, and chloride into and out of themselves by opening and closing "ion channels", which are specific for each type of ion. These ion channels (openings in the cells membrane) are passive, so the ions diffuse into or out of the cell depending on the concentration gradient. The sodium/potassium pump, on the other hand, actively moves the sodium and potassium ions against the concentration gradient (while the ion channels are closed) in order to build up the concentration imbalances for these two ions (most potassium inside, most sodium outside). These two concentration imbalances, combined with the cell membrane's -70mv electrostatic charge imbalance, set the cell up for the transmission of an electrical signal.
If you lower the -70mv electrostatic charge imbalance across any part of a nerve cell's membrane, the sodium ion channels (which are held closed by the -70mv charge) will open up. Since there's a large concentration imbalance, positively charged sodium ions will flood (diffuse) into the cell, reducing the negative charge across adjacent parts of the membrane, causing additional sodium ion channels to open. This causes a chain reaction of falling voltage across the membrane that runs down the entire length of the nerve cell, until it reaches the terminal knob of the nerve cell. The terminal knob has a synapse that releases neurotransmitter molecules (acetycholine) to the synapse of an adjacent nerve or muscle cell. If it's a muscle cell, it will contract, producing motion. If it's a nerve cell, it will continue to transmit the signal down the line until it reaches a muscle cell or sends a signal to the brain. The -70mv charge across the membrane can be reduced below it's -50mv threshhold by many things (including hot or sharp objects), which is why we are able to feel things like pleasure and pain.
This is just one example of how the cell uses diffusion and osmosis to it's advantage. It's important to remember that the cell contains many additional substances (also subject to diffusion and osmosis), which are involved in other, simultaneous processes. The interactions between potassium, sodium, and chloride that were examined here have been abstracted out of the complicated soup that exists in the cell in order to examine one particular cellular process. The process is real, but it doesn't happen in isolation. It exists as a process because it's able to overwhelm the effects of other substances to bring about functional changes in the cell.