It is either colouration, eg: one of its parents was a dalmation molly and the black spots are starting to develop. Or its a parasitic worm that gets into the muscle tissue and causes black spots.
If the fish is young then it's probably colouration. If it's an adult fish that has been exposed to river water or some lives foods that came from waterways containing birds and other fish, it could be parasites.
If it is parasitic worms they don't normally harm the fish, but can sometimes be killed with Praziquantel or medications designed to treat thread/ round worm infections in fish.
I would monitor it over the next few months and see what happens. I wouldn't be too concerned tho.