How Rock Is Formed