Rearrangement of double bonds
This could be due to hydride shift.



In the first image, the pi-bond shifts on the carbon from which $\ce{H}$ is eliminated. As the pi-bond leaves the first carbon, it becomes positively charged due to lose of electron, and the $\ce{H}$ gets converted to $\ce{H^-}$(hydride ion) as it accepts electron. Therefore, it is called hydride shift. It also stabilises the molecule as the resulting molecule is conjugated. The same can be applied for second and third images.

This is for the second image. The third one you can do it yourself. All the resulting molecules are stabilised due to conjugation.