Methyl and hydogen rearrangements (also known as methyl and hydride shifts) are common in mechanisms involving carbocation intermediates, but they may may occur elsewhere. You will see one of these rearrangements occur when they would create a more stable carbocation (for example, changing a primary carbocation to a secondary or tertiary carbocation).