The second law of thermodynamics is one of the most fundamental laws of nature, having profound implications. In essence, it says this:
The second law - The level of disorder in the universe is steadily increasing. Systems tend to move from ordered behavior to more random behavior.
One implication of the second law is that heat flows spontaneously from a hotter region to a cooler region, but will not flow spontaneously the other way. This applies to anything that flows: it will naturally flow downhill rather than uphill.
If you watched a film forwards and backwards, you would almost certainly be able to tell which way was which because of the way things happen. A pendulum will gradually lose energy and come to a stop, but it doesn't pick up energy spontaneously; an ice cube melts to form a puddle, but a puddle never spontaneously transforms itself into an ice cube; a glass falling off a table might shatter when it hits the ground, but the pieces will never spontaneously jump back together to form the glass again. Many processes are irreversible, and any irreversible process increases the level of disorder. One of the most important implications of the second law is that it indicates which way time goes - time naturally flows in a way that increases disorder.
The second law also predicts the end of the universe: it implies that the universe will end in a "heat death" in which everything is at the same temperature. This is the ultimate level of disorder; if everything is at the same temperature, no work can be done, and all the energy will end up as the random motion of atoms and molecules.
Entropy
A measure of the level of disorder of a system is entropy, represented by S. Although it's difficult to measure the total entropy of a system, it's generally fairly easy to measure changes in entropy. For a thermodynamic system involved in a heat transfer of size Q at a temperature T, a change in entropy can be measured by:
The second law of thermodynamics can be stated in terms of entropy. If a reversible process occurs, there is no net change in entropy. In an irreversible process, entropy always increases, so the change in entropy is positive. The total entropy of the universe is continually increasing.
There is a strong connection between probability and entropy. This applies to thermodynamic systems like a gas in a box as well as to tossing coins. If you have four pennies, for example, the likelihood that all four will land heads up is relatively small. It is six times more likely that you'll get two heads and two tails. The two heads - two tails state is the most likely, shows the most disorder, and has the highest entropy. Four heads is less likely, has the most order, and the lowest entropy. If you tossed more coins, it would be even less likely that they'd all land heads up, and even more likely that you'd end up with close to the same number of heads as tails.