Maxwell's demon (J.C. Maxwell):
A thought experiment demonstrating the concepts of entropy. We have a container of gas that is partitioned in two equal sides; each side is in thermal equilibrium along the other. The walls & the partition of the container are perfect insulators.
Now suppose there is a very small demon that is waiting at the partition beside a small trap door. He can open & close the door along with negligible work. Let's say he opens the door to let a fast-moving molecule to travel from the left side to the right side, or for a slow-moving molecule to travel from the right side to the left side, & keeps it closed for all other molecules. The total effect would be a flow of heat from the left side to the right side even though the container was in thermal equilibrium. Clearly this is a violation of the second law of thermodynamics.
Thus where did we go wrong? It turns out that information ought to do with entropy as well. To sort out the molecules according to speeds, the demon would keep a memory of them and it turns out that enhance in entropy of the maintenance of this plain memory would more than make up for the reduction in entropy because of the heat flow.