Dehydration of alcohols involves the formation of carbocation intermediate and this carbocation rearrange to form more stable carbocation which looses proton to form a more stable alkene.
In the following dehydration reaction also initially a secondary carbocation is formed which undergoes methyl shift to form a more stable tertiary carbocation which looses proton to form a stable alkene.





