There are a number of things you can do to study this. One is to do tests in the laboratory that speed up the process – for example, if you think rock A becomes rock B when subjected to heat and pressure, you can take a small amount of rock A and subject it to heat and pressure in a laboratory – this would take millions of years “in the wild”, because the rock would have to be covered by later layers of rock in order to squash it down and heat it up, but in the lab you can do it in a matter of hours, although only to a tiny sample. If the tiny sample of rock A turns into rock B in the lab, you can be pretty sure it will do so in the open as well.
Another thing you can do is study how you expect the chemical structure of the rock to be modified under changing conditions. We know what minerals rocks are made of, and theoretical chemists understand about chemical bonding and how it depends on the environmental conditions. So it is possible to apply heat or pressure or different acidity or whatever to your theoretical model of the minerals, and see what you predict to happen. These predictions can be tested using the lab experiments I talked about before, to check that they are reliable.
In some cases, you can also take samples of rock of different ages and see how it has changed. For example, if you consider an active volcano like Mt Etna in Sicily, you can see directly both new lava flows and old lava flows. You can check the ages using radioactive dating, and compare the new and old lava to see how it has changed.
Comments