Cementite is a chemical compound whose inclusion hardens steel. Each molecule is made of three iron atoms bonded to one carbon atom (Fe3C) to form a crystal lattice structure called orthorhombic, where multiple rectangular prisms arise from the same base structure and intersect at 90 degree angles. The result is a very hard and brittle substance called iron carbide, or cementite.
In its purest form, cementite is classified as a non-oxide ceramic. It is solid and inert, and can withstand crushing force, chemical erosion, abrasion, and temperatures up to 3000 degrees F (1600 C). It forms naturally by the melting of white cast iron, where it precipitates out of the iron as carbon to form large particles. It sometimes appears this way in phase with austenite, an allotrope of iron, which can sometimes cool to form martensite, a steel with a very strong crystal lattice.
Steel is tempered to increase hardness and reduce brittleness by creating cementite. The first step in the tempering process is called austenizing, when the steel is melted into a solution of iron and carbon, or austenite. The steel is rapidly cooled, and martensite forms from the austenite. It is then heated again, and cooled slowly in a controlled manner, and cementite is formed. It is impossible to produce enough energy to run the reaction to completion, so the cementite is usually mixed with small amounts of unconverted martensite, bainite, which is also Fe3C, but with a different crystal structure, and ferrite(iron).
Cementite is ferromagnetic, which means it displays magnetic characteristics with or without a magnetic field, like a refrigerator magnet. At 480K (404 F, 207 C), however, the atomic poles begin to move around and are no longer aligned. The spins of the molecules become randomized, and magnetization ceases. The substance becomes paramagnetic, which means it is only magnetized if the field is applied by an outside source. Even then, the magnetization will be weak because it relies upon induced dipoles, and no outside force can induce every dipole in every molecule, crystalline structure or not. In fact, it is the non-linear attraction that gives ferromagnets their strength.
There is a substance very similar to cementite called cohenite. It is also Fe3C, except it forms a rod-like crystal and contains trace amounts of nickel and cobalt. It occurs naturally in meteorites, and on Earth is places with very high iron deposits, like volcanic magma flow trails that happen over coal deposits.