How does one type of rock change into a different type of rock?

It change by Heat,Pressuer,Werthering