The heating of rock by nearby magma that causes the rock to change is called contact metamorphism.