Metamorphism is the process by which rocks undergo changes in mineralogy, texture, or chemical composition due to high temperature and pressure. It contributes to mineral formation by causing existing minerals to recrystallize and form new minerals through the rearrangement of atoms.