Diamagnetism is a property of materials that causes them to create an opposing magnetic field when exposed to an external magnetic field, resulting in a weak repulsion. This phenomenon occurs because the orbital motion of electrons in atoms generates small magnetic fields that align opposite to the applied magnetic field, making all materials inherently diamagnetic to some degree, although the effect is usually very weak compared to other forms of magnetism.