Water changes. Try and keep your ammonia + nitrite combined below 0.5ppm.
As per my reply to your other post, your priority should be cycling the tank. While you might diagnose whatever is wrong with the fish and treat it, they would still be in an uncycled tank and possibly back at square 1. Medication runs the risk of crashing what little cycle you have. It's likely ammonia poisoning, and i dont know of a treatment for that beyond clean water.
Also look at your tank size and stock. 10g is too small for the fish you have.