what is the second law of thermodynamics and how does it relate to entropy