First of all, try doing a series of large water changes, at least 50%, daily. Don't feed the fish anything for two days, then only bloodworm or peas (lightly cooked, squeezed out of the 'shell' and chopped or crushed), as they're both slightly laxative which will help clear the fish's gut.
We could do with getting to the root of the problem, however, so we can make sure this doesn't keep happening.
How big is your tank and was it cycled before you added fish? Is it cycled now and do you have any water tests results? What other fish do you have? How often and how large are your water changes? What filtration are you running, and how do you maintain your filter, exactly? What are you feeding the fish on?