When heat flows from one object or substance to another it is in contact with, the objects or substances are said to be in thermal contact. The state where objects in thermal contact with each other reach the same temperature, no heat flows between them.
Lose electrons - electrons want to fill their outer valence shell, so sometimes instead of gaining it is easier to lose some and have a filled outer shell