Firstly, you need to get a test kit and test the water for excessive levels of ammonia, nitrites and nitrates. Cyprio is one brand. When you have done this you can rule out poisoning from the list of possible problems.
There could be a problem with its swim bladder or it could be a fungal infection (can you see anything like cotton wool on the fish) or there could be a worm infestation or there could be internal parasites or it could have been injured by a scratch (see any spots?)
Good garden centres will sell any or all of the following mixtures:
Melafix,Contraspot, Gold Med or General Tonic all sold by Tetra Medica.
The sick fish should be isolated in a 45 litre tub (like builders use) with a bit of garden net as a lid (fish jump) and a 6 inch length of plastic pipe for it to hide inside. treat for up to a week, giving it topups of fresh water.
Another thing you could try is a salt bath. 45 litre tub bucket filled with rain water to which one heaped tablespoon of kitchen salt has been mixed in well prior to adding the fish.Put the fish in and leave for a maximum of one day. Then move it to fresh water.
Be wary of online advice as many people are just the blind leading the blind. I have done all the above with good results. Many vets have no experience of dealing with fish. It's sad that there is so little in the way of reliable help for fish keepers.