There are several things that can cause Clown loaches to get black spots. Some of them are nothing some are very harmful.
If I were to decribe these, are they round black smaller circles all over? Or more like lage black patches? A picture of the fish with the psots on them would be helpful.
They can get black spots from Water conditions. Recomendation is first test all water perameters inside the tank as well as from your tap. Test for Ammonia, Nitrite, Nitrate and PH level. Once we know those readings then it can be figured if this is an issue or not. If your tap test good but tank test high with any or out of wack make the water change corrections as needed.
Other potential issues are if more then one clown loach they can push peck and get at each other. This can be caused by this as well as rough substrate or decor.
The other potential issue for Clown loaches is what is known as Blackspot "disease". It cannot be treated. It is actually a larva of a digenetic fluke. It can be introduced by wild or pond based snails Or even wild caught fish. In the wild the parasite is transfered from Birds to snails then to fish. It can end up in a fish tank based on where your loaches were from, any snails they have been near are wild or have been in contact with the parasite. It is a dead end disease for the parasite once it ends up in a fish tank and there is no other ways for it to reproduce and move on with out the cycle of life that moves from Bird > Snail > fish > back to bird and starts all over. It is noramlly something that will go away on its own and again, no medications there are treat it due to where the parasite is and lives. The larvae lives in/on the skin, fins or in the tissue of the host fish and may become saturated with the fish pigment, thus why the black color.
Just maintain quality water conditions and it should go away. Without any way for the parasite to reproduce and live on they will die off and not effect the fish.
BUT......... To determine this we would need to see pictures.