Ketamine blocks NMDA receptors, reducing the excitatory actions of glutamate in the brain, leading to its anesthetic and dissociative effects.