Pyrite in Quartz
There are three ways inclusions can get into the quartz crystal:
Some Quartz crystals grow simultaneously with an infinite amount of many different minerals. These inclusions are called syngenetic. Other minerals have grown before the Quartz and then the quartz engulfs them and the original form of the included mineral is preserved. These inclusions are called protogenetic.
Minerals can get into another mineral by exsolution. When the conditions during crystal growth allowed the incorporation of elements into the crystal lattice that are incompatible with the crystal structure at different temperatures or pressures, these elements may separate from the lattice to form new minerals once the conditions change. Such inclusions are called epigenetic. Very often these inclusions are specifically oriented with respect to the crystallographic axes of the main crystal. The best example of a quartz with epigenetic inclusions is rose quartz.
* Scientific proof may not be available to substantiate these claims.