Crystal formation is influenced by various factors such as dissolved minerals, melted rock, vapor, temperature, and pressure. When a crystal grows, these factors affect the rate and conditions of crystal growth. The presence of specific dissolved minerals or melted rock determines the composition of the crystal. Temperature and pressure conditions impact the speed and stability of crystal growth, leading to different crystal shapes and habits.