It can be caused by all sorts of different things; it is a bit like 'stomach ache' in people; it's a symptom rather than a disease in itself.
The most common cause would probably be internal bacterial infections picked up while the fish's immune system is compromised by living in poor water conditions.