A VEP (Visual Evoked Potential) test measures the electrical activity in the brain in response to visual stimuli. It is used to assess the function of the visual pathway from the eyes to the occipital cortex, providing vital information for diagnosing various visual and neurological disorders.