When an AVL tree becomes unbalanced after an insertion, rotations (single or double) are performed to restore balance.