Neurons receive signals on their dendrites from the axons of other neurons via neurotransmitters. Whether or not one neuron fires is determined by combining the magnitude of all of the signals received from other neurons/stimuli with a bias specific to that neuron (which we might call, simplistically, a “plasticity coefficient” that might be different from one neuron to the next). There are many different types of neurons (which we only know so much about), but that is the basic principal.
Neurons also have “ion channels” that act as gates between the intracellular membrane and the extracellular area (the area outside of the cell). There are many different kinds of ion channels (about fifty, I think), but, no matter how they are constructed or operate, they either let some cells in, let some cells out, or do both, often in response to concentration-related pressure (too many of a particular ion-species, like calcium, potassium, sodium, etc..). High concentration on the inside might trigger the ion channels to release certain ions outwards (efflux). Conversely, maybe the electrical level inside the cell is so high or so low that the ion channels open to admit a certain type of ion (influx; usually to oppose it). The featured image is the popular/idealized representation of ion channels. This is closer, showing their compound protein structures:
Neurons essentially work by building up charges (by adding or removing positive or negative ions as a result of inputs from other neurons) and, if they build-up enough, the neuron fires down the axon and releases a bunch of neurotransmitters at the end, which then hopefully hit the next cell (glial cells provide a lot of support for neurons, including cleaning up lost neurotransmitters, and number about one hundred to every one neuron).
I always forget that I first found my heart in this stuff.
The answers I found were specific to epilepsy as epilepsy is a popular research area and, I am guessing, the source of many/most seizures in the world. Epilepsy is like an electrical storm in the brain. It makes your head go haywire.
So, what does anti-seizure medication do? It deadens ion channel activity in order to reduce neurotransmitter activity in order to mitigate (reduce) the propagation of this storm across the brain. Unfortunately, it still seems as if we do not understand many or all of the anti-seizure drugs and that it is a guessing game as to which will work for a particular variety of the disorder.
Short and sweet answer about how they work:
Overview of how these medications move through the body: