Magnetostriction is the property of ferromagnetic materials that causes them to change shape or dimensions when exposed to a magnetic field. This phenomenon arises from the rearrangement of the atomic magnetic moments within the material, leading to a change in the material's physical dimensions.