Just saw this and thought I'd add my two cents since we've been through this a ton of times with our little ones.
Depends on the cat as to what the exact cause is, but I can share what causes I've found:
I would seriously consider talking to the vet about doing a blanket de-worming of your cat just to be on the safe side. Treat for the normal stuff and see if that helps.
I had 16 foster kittens a few years back with severe diarrhea that would not go away. For a month and a half I was bringing in stool samples practically daily to the animal shelter's medical area (where I was also working at the time) and the technicians would run fecal samples and would find nothing. Finally a visiting vet decided to do a fecal himself and found SEVERE infestations of just about everything a cat could have - roundworms, tapeworms, bacterial infections, coccidia, camphylobacter..... The problems were found so late that 7 of the kittens had already died. I will never trust any vet's office to tell me that a stool sample is clean since that job is almost exclusively done by a technician or assistant. The techs I worked with were excellent at their job - but they ended up being completely horrible at performing fecals. I learned how to do fecals myself after that tragedy!
Food allergies is also another big one! L.S. - who is my avatar picture and is on my lap right now, was allergic to any food with wheat in it when he was younger. Thankfully five years later he's completely grown out of it, but it took about two months to realize it was the food that was causing the problems, and he made a lot of messes during that time! Cat's can be allergic or sensitive to just about anything. Of my last litter of three rescued kittens, two were allergic to beet and egg (which is in a lot of commercial kitten food), but their brother could eat anything.
Irritable bowel syndrome is often overlooked as well. My mother has a cat (one of the 16 kittens from the above story) with severe IBS! Her cat is having normal stool now that's she's on a steroid regiment and getting "good bacteria" added to her diet once a day. It did cost a fortune for the biopsy for a positive diagnosis, but our vet is known for being astronomically expensive compared to other vets - be sure to shop around if you feel comfortable doing so. It was originally assumed that she had leukemia (real cancer, not the virus) because of a high white blood cell count, but it was actually from her own body attacking her digestive tract.
Campylobacter is a bacterial infection that cannot be detected by a normal fecal. There are other bacterial infections as well, but this one is pretty well known and is becoming more common in cats. Most of the time a sample has to be sent out to be cultured to find out if this is the cause. Shop around - my vet said it would cost $90 - a friend of mine had the same test run for $20 at a different vet. Campy is known to be very hard to treat, but will run it's course in about two years is not treated without causing too much trouble other than diarrhea.
One thing you can try right off the bat is to ask your vet to prescribe one of the two meds below. The drugs work by killing anaerobic bacteria that can inflame the digestive tract. They work as an anti-inflammatory that can stop often stop diarrhea in it's tracks even if there are no parasites causing the problem. Metronidazole usually costs more, but the liquid form can be tailored to any cat's size and can be flavored with liver or chicken or whatever to make it go down easier. It's also available in pill form for larger cats. I've found it worked the fastest at stopping diarrhea - often in one dose, but it's not for long-term use. The other medication is Albon (brand-name) which is a mint flavored sulfa antibiotic. It's used mainly to treat coccidia and can be used for longer periods of time. It may take a few days to kick in, but can make a huge difference in hardening things up. I was using this on the rescued kittens, and not only did their diarrhea stop, so did their gas. Both drugs are "old-school" and I think a lot of vets tend to overlook them now, but I've found them to be life-saving when working with very ill kittens and cats. Every time we've used it we've had to say, "what about trying __" and then the vet was like "Yeah, that could work!" And it did.
Your vet could also prescribe a clay-based antacid that can help stop diarrhea at least short term. DO NOT USE OVER THE COUNTER DRUGS!!!! Ten year ago you could give your cat OTC "pink-stuff", but they changed the formula and now it's deadly. Your vet can prescribe a safe "pink-stuff" that's for use with cats. I've used the safe stuff in kittens and cats who were either stressed to the squirts point or were having issues with food allergies with good results.
Most of the time you just have to find a way to break the cycle and give their system time to heal. Once they've had around six months to heal I've rarely had relapses, and I'd say over half the cats we have had problems when they first came to us.