DNA methylation inhibitors, also known as demethylating agents, work by inhibiting the activity of DNA methyltransferases (DNMTs), the enzymes responsible for adding methyl groups to DNA. By blocking DNMTs, these inhibitors can reverse abnormal DNA methylation patterns, thereby reactivating silenced genes, including tumor suppressor genes. This reactivation can restore normal cellular functions and inhibit cancer cell growth.