Isomerism is a phenomenon in chemistry where two or more compounds share the same molecular formula but differ in the arrangement of atoms or the spatial orientation of their structures. These variations can lead to distinct physical and chemical properties. Isomers can be categorized into structural isomers, which differ in the connectivity of atoms, and stereoisomers, which have the same connectivity but differ in the orientation of atoms in space. Examples include glucose and fructose, which both have the formula C6H12O6 but differ in structure and properties.