Optic neuritis is an inflammatory condition that affects the optic nerve, which is responsible for transmitting visual information from the retina to the brain. This inflammation can lead to a sudden reduction in vision and is often associated with pain, particularly upon eye movement.