How do humans get epilepsy?

Multiple causes. People can get epilepsy due to genetic factors, brain tumor, traumatic brain injury, infection, stroke, degenerative disease or congenital malformations.
Varies. Causes include genetics, trauma to the brain (stroke, tumors), and no clear reason at all. Electrolyte abormalities, medication overdose, alcohol/benzo withdrawal, and drug use can cause seizures but typcially not epilepsy.