Roughly speaking solid matter is on a lattice form,
A three-dimensional lattice filled with two molecules A and B, here shown as black and white spheres.
The molecules fit like LEGO , the forces tying them together are mainly the spill over electric field forces , attractive and repulsive forming the patterns of the lattice.
In a single crystal one quantum mechanical solution applies and the atomic distances are at their lowest/ground energy state, which has vibrational and rotational degrees of freedom of the molecules and atoms.
Thermal input increases the energy transferred to the lattice and this means that the atoms/molecules transit to higher energy levels by absorbing thermal photons. Higher energy levels for each atom mean higher average distance in the solution of the potential well for each of them. This necessarily means expansion, which will be transferred by electromagnetic interactions, from atom/molecule to atom/molecule. This will induce stress macroscopically, the addition of the impulses will have macroscopic consequences, expansion.
Correspondingly in cooling the atoms/molecules return to the ground state emitting thermal photons and that is the noise heard as the lattice contracts.
So it is the change in energy levels at the microscopic framework, leading to change in average distances which will manifest as stress.