There are many potential reasons why someone could have a seizure. Some seizures are a symptom of an acute condition, such as an illness or a recent head injury. Some people will have an isolated seizure for no apparent reason and never have another one.
When someone has epilepsy, they have an underlying brain condition that makes them more likely to have recurrent seizures. There are a wide range of causes of epilepsy.