In 1867,Scottish physicist James receptionist Maxwell challenged the second law of thermodynamics according to which entropy in a closed system must always increase. In his thought experiment, Maxwell took a closed gas container, and divided it into two parts with an inner wall and provided the wall with a small trap door. By opening and closing the door,the creature – 'demon' – controlling it could separate gradual cold and quickly warm particles to their respective sides, thus creating a temperature difference in contravention of the laws of thermodynamics.
Source: phys.org