There are many reasons why a dog might have seizures.
Idiopathic (inherited) epilepsy is known in Cesky Terriers, and affected dogs and their siblings should not be bred from, but there are many other non-inherited causes of fitting which are often hard to pinpoint. Although very frightening for the owner, seizures are not painful for the dog and with appropriate medication can be successfully managed, giving the dog a good quality of life.

A seizure occur when there is abnormal electrical activity in the brain which leads to sudden, short-lived changes in a dog's behaviour.

You can read more about epilepsy and its manageemnt here