If your dog runs around in circles from time to time, it isn't necessarily a cause for concern -- sometimes, dogs just do it out of excitement. At other times, it's a symptom of an illness, or a behavior related to your dog's level of activity. If you're concerned about your dog's behavior, monitor how often he runs in circles, and what his behavior before and after is like. It could simply be that he needs more exercise and attention, but at the same time, it could be that he needs a visit to the veterinarian.
You probably get antsy when you're bored, and your dog is no different. If he isn't getting enough exercise or stimulation and he's bored, he may run in circles out of frustration. He doesn't just need to burn off energy -- he needs something to occupy his mind. Daily walks are crucial, but so is giving him access to toys that he can use to entertain himself when you aren't beating the streets. Running in circles, along with running around the house and jumping about, can be an indication that he needs some exercise.
Some dogs engage in behaviors like running in circles because of compulsive disorders that compel them to act abnormally. This is usually a result of stress or anxiety. Your dog doesn't have to be living in a stressful environment currently, either -- if he suffered from abuse or a stressful life in the past, like some rescue dogs have, he may still retain compulsions like running in circles. Dogs may also behave like this as a result of other stresses, like separation anxiety or excessive confinement.
Having distemper isn't the same thing as having a temper -- distemper is a contagious viral disease that affects dogs, and attacks their brain cells in particular. One symptom of distemper is suffering from seizures, which generally include running in circles before your dog falls over and kicks his feet. He may appear disoriented after the seizure. This is just one symptom -- others include eye and nasal discharge, fever and vomiting. Only a veterinarian can diagnose and treat this disease, so if your dog appears sick and runs in erratic circles like these, make an appointment as soon as possible.
Your dog may run in circles out of sheer excitement, like if he is offered a special treat. He may twirl around or circle you when you show him his leash before walk time, or when you come home after a day at work. Dogs can't express or channel their excitement in many ways, but running in circles allows them to simply burn off a little adrenaline when they get particularly excited.