The Second Law of Thermodynamics describes the general constraints upon the direction of heat transfer of a system and the maximum efficiency of a heat engine. It states that in any cyclic process the entropy, a state variable that is a measure of the statistical disorder of a system will either increase or remain the same. This can be presented in equation form as,
is the change in entropy,
is the heat transfer,
and T is the temperature, so that the change in entropy is always greater than or equal to zero. Since entropy must never decrease, the Second Law of Thermodynamics can be interpreted as an indicator of the direction of flow of time. That is to say, if we measure the entropy or disorder of a system at two distinct times, the time at which the system is in greater disorder is the later time.
There are many physical phenomena that are often misquoted as violating The Second Law of Thermodynamics, the idea that disorder must increase over time. Life on Earth, for example, is an obvious and frequently stated one. Evolution from tiny microbes (somewhat ordered) to complex human beings (very ordered) seems to be a clear example of order emerging from chaos. However, the Second Law of Thermodynamics applies to closed systems. This means that the entropy change of every process that went into making life on Earth must be taken into account. If one does this, one sees that the decrease in entropy that comes along with forming a human being is accompanied by an enormous increase in entropy from the radiation of energy from the sun (along with other increases and decreases). So that on balance the entropy, or disorder, of the Universe actually increases.
The First Law of Thermodynamics is that of "conservation of matter and energy," which states that matter and energy cannot be created or destroyed. Within an isolated system the total energy is constant. Any change in the internal energy of a closed system is equal to the amount of heat supplied to the system, minus the amount of work done by the system on its surroundings. The Laws of Thermodynamics thus place a limit on the efficiency of a heat engine. Efficiency is, simply put, a ratio of the useful output energy to total input energy. An efficiency of 1 means that all of the energy put into the system is spat out as useful energy, with no loss through waste processes. Efficiency is capped at 1 i.e. you cannot get more energy out of a closed system than you put in.