Dissociative seizures happen for psychological rather than physical reasons. This is different from epileptic seizures which happen because of abnormal electrical activity in the brain. They can be a response to traumatic events, and happen when a person splits off (or ‘dissociates’) from their feelings about the the painful experience.
I first heard about dissociative seizures from the excellent book It’s All in Your Head by Suzanne O’Sullivan. Here she is talking about real stories of imaginary illnesses: