Chert forms when microcrystals of silicon dioxide grow within soft sediments that become limestone or chalk. The chert formation can be either of chemical or biological origin.
Due to change in environmental conditions, rocks are heated and pressurized deep inside the Earth's surface. Hornfels is formed from the extreme heat caused by magma or by the intense collisions and friction of tectonic plates.