There are many potential causes, including low blood sugar or calcium, heat stroke, some infectious diseases and poisons, head trauma, liver or kidney disease, poor circulation of the brain and, rarely, tumours.
But if your dog is younger than eight years, the commonest cause is epilepsy.
In most cases the fit will have finished before you can even telephone the vet, let alone bring your animal to the surgery.
So, although it’s easy to panic, try to stay calm and observe the fit carefully, after clearing the area around your dog to avoid injury.
Was your pet at rest or playing when it happened?
Did it start suddenly or develop gradually?
Avoid putting your hand near your pet’s mouth in case it accidentally bites, but try to observe if it is aware of you during the fit, whether its eyes are fixed of flickering and the colour of its tongue.
Time how long the fit lasts, and whether your pet recovers quickly or seems confused or disorientated afterwards.
All these observations can be really helpful to your vet in deciding the likely cause of the seizure. After taking your history, your vet will examine your pet and may well recommend further investigations, such as blood tests.
If a cause other than epilepsy is suspected, your vet may advise a scan is undertaken, but epilepsy is often a diagnosis of exclusion, in other words, it is arrived at after other possible causes have been ruled out.
Fortunately many dogs with epilepsy can be managed well with medical treatment but some are more difficult to control.
In such cases support groups can be invaluable and your vet will be able to give you some useful contacts.