Hi and welcome to the forum
The fish has a bacterial or protozoan infection. If it happened suddenly overnight, it is probably bacterial.
How long has the tank been set up for?
How long has the filter been running for?
How often do you do water changes and how much water do you change?
Do you use dechlorinated water?
Do you gravel clean the substrate in the aquarium when you do a water change?
Have you checked the ammonia, nitrite, nitrate, pH and general hardness (GH) of the tank water?
If yes, what were the results in numbers.
-----------------------
Wipe the inside of the glass down, do a 75% water change and complete gravel clean. Make sure any new water is free of chlorine/ chloramine before it is added to the tank.
Increase surface turbulence/ aeration to maximise the dissolved oxygen in the water.
You can add rock salt (often sold as aquarium salt), sea salt or swimming pool salt to the aquarium at the dose rate of 1 heaped tablespoon per 20 litres of water. If there is no improvement after 48 hours you can double that dose rate so there is 2 heaped tablespoons of salt per 20 litres.
If you only have livebearers (guppies & mollies) in the tank you can double that dose rate, so you would add 2 heaped tablespoons of salt per 20 litres and increase it after 48 hours if there is no improvement so there is a total of 4 heaped tablespoons of salt per 20 litres.
Keep the salt level like this for at least 2 weeks but no longer than 4 weeks.
You will need to add more salt whenever you do water changes but you only add salt to the new water. eg: you change 20 litres of water so you add salt to that 20 litres.
The salt will not affect the beneficial filter bacteria but the higher dose rate will affect some plants. The lower dose rate will not affect plants.
After you use salt and the fish have recovered, you do a 10% water change each day for a week. Then do a 20% water change each day for a week. Then you can do bigger water changes after that.
-----------------------
Livebearers need hard water with a GH above 200ppm for guppies, platies & swordtails. And mollies need a GH above 250ppm otherwise they develop all sorts of issues. If the GH of your water is below 200ppm you will need to increase the hardness by adding mineral salts. The easiest way to do this is with a Rift Lake water conditioner, available from any pet shop or online. You add some to the aquarium and whenever you do a water change.