Impurity
Impurities are substances inside a confined amount of liquid, gas, or solid, which differ from the chemical composition of the material or compound.
Impurities are either naturally occurring or added during synthesis of a chemical or commercial product. During production, impurities may be purposely, accidentally, inevitably, or incidentally added into the substance.
The level of impurities in a material are generally defined in relative terms.  Standards have been established by various organizations that attempt to define the permitted levels of various impurities in a manufactured product.  Strictly speaking, then, a material's level of purity can only be stated as being more or less pure than some other material.

# Destructive impurities
Impurities can be destructive when they obstruct the working nature of the material. Examples include ash and debris in metals and leaf pieces in blank white papers. The removal of impurities is usually done chemically. For example, in the manufacturing of iron, calcium carbonate is added to the blast furnace to remove silicon dioxide from the iron ore. Zone refining is an economically important method for the purification of semiconductors.
However, some kinds of impurities can be removed by physical means. A mixture of water and salt can be separated by distillation, with water as the distillate and salt as the solid residue. Impurities are usually physically removed from liquids and gases. Removal of sand particles from metal ore is one example with solids.
No matter what method is used, it is usually impossible to separate an impurity completely from a material. What technicians can do is to increase the purity of a material to as near 100% as possible or economically feasible.

# Constructive impurities
Impurities can, though, add constructive properties to a material. Alloys are metals with impurities.  The resulting combination has desirable properties not found in the constituent materials.  Steel, for example, is made by introducing a controlled amount (less than 2%) of carbon into pure iron. In the manufacturing of solar cells, pure silicon is mixed with a very small portion of impurities (0.001% to 0.01%) in the form of phosphorus and boron atoms in order to generate electricity. This is known as doping of silicon and is constructive, although the phosphorus and boron could be called impurities.
Research on magnetic impurities has shown that considerable alteration of certain properties such as specific heat may be affected by small concentrations of an impurity, as for example impurities in semiconducting ferromagnetic alloys may lead to different properties as first predicted by White, Hogan, Suhl and Nakamura.

# Impurities and nucleation
When an impure liquid is cooled to its melting point the liquid, undergoing a phase transition, crystallizes around the impurities and becomes a crystalline solid. If there are no impurities then the liquid is said to be pure and can be supercooled below its melting point without becoming a solid. This occurs because the liquid has nothing to condense around so the solid cannot form a natural crystalline solid. The solid is eventually formed when dynamic arrest or glass transition occurs, but it forms into an amorphous solid  a glass, instead, as there is no long-range order in the structure.
Impurities play an important role in the nucleation of other phase transitions.   For example, the presence of foreign elements may have important effects on the mechanical and magnetic properties of metal alloys.  Iron atoms in copper cause the renowned Kondo effect where the conduction electron spins form a magnetic bound state with the impurity atom.    Magnetic impurities in superconductors can serve as generation sites for vortex defects.   Point defects can nucleate reversed domains in ferromagnets and dramatically affect their coercivity.  In general impurities are able to serve as initiation points for phase transitions because the energetic cost of creating a finite-size domain of a new phase is lower at a point defect. In order for the nucleus of a new phase to be stable, it must reach a critical size. This threshold size is often lower at an impurity site.