Ok, this is a large qiestion. Firstly, from second law of thermodynamics, thermal flow always happens between matters kept in different temparature. But while an endothermic reaction takes place, it may extract some heat from environment and consume it. Isnt it against second law? And for example, making solution can be an endothermmic or exothermic process. If it is an endothermic process, by La Chatelier's law, increasing temparature results in more compound being solufied. But if its an exothermic process opposite happens and the compound is less soluable in higher temparature. But if we physically look at it, thehigher the temparature and higher the molecular energy is, the better the compound should be solufied. How do you physically explain it?