It could be due to either poor water quality or injury. Have you tested your water?
Whether it is poor water quality or injury, the best way to get rid of it is just keeping the water clean and healthy. If you want, you could add some salt or melafix.