It happens because of a method of heat transfer known as conduction. Usually, when the heat is applied to a matter, it causes all the atoms and molecules in it to move. As these atoms or molecules move, they also come in contact with other molecules. As a result of this collision, these molecules also move.
This process goes on until heat is transferred to all the atoms or molecules in a matter. It explains why the heat coming from a source does not only affect the bottom of a pot but the entire part of the pot, including the handle.
As the bottom of the pot begins to receive the heat from the burner, the molecules at the bottom of the pot begin to move. As they move, they also collide with molecules in other parts of the pot until the molecules collide with the ones in the handle.