Unusual swimming is almost never a good thing in aquarium fish like catfish. It usually indicates some kind of problem with the swim bladder, a delicate organ fish use to keep upright and oriented in the water column. Some types of swim bladder damage can be fixed, and others cannot.
Swim Bladder Damage
The most likely cause of a fish's swimming at odd angles is swim bladder damage or disease. The swim bladder consists of a gas-filled sac, which fish can usually control to varying degrees. When fish like catfish get a damaged swim bladder, they will typically swim at odd angles, or struggle to swim at all. If you see a catfish swimming on its side, it almost certainly has damage to the swim bladder.
Cause of Swim Bladder Issues
Swim bladder disease is a symptom, not a single disease. A huge variety of problems can cause it. Overfeeding and constipation can cause pressure on the swim bladder from the digestive tract. Additionally, infection, injuries from fighting and poor water quality can all damage the swim bladder. In order to determine what to do next, you need to root out the cause of the problem. Is the aquarium overcrowded? Has the fish been fighting? In any case, you will need to prevent the cause from recurring.
Treatment varies due to the wide range of causes. For some fish, damage to the swim bladder may be permanent. In other cases you may be able to treat the fish and reverse the damage. If you see signs of constipation, such as a swollen abdomen, feed your catfish crustaceans like brine shrimp or Daphnia, which can cure this condition. If you see signs of disease, treat the fish with antibiotics. You may want to treat him in a separate aquarium, since antibiotics can have negative effects on other fish and the infections that damage swim bladders rarely spread between fish. Keep in mind that in many cases, if you remove the cause of the damage—e.g. fights with a tankmate or poor water quality—the damage will often heal on its own.
Other Causes of Unusual Swimming
Damage to the swim bladder is the usual cause of swimming at odd angles. However, a few other, less likely cases of unusual swimming may be at play. Some catfish have frantic, manic swimming patterns when spawning. This includes some of the common cory catfish. Additionally, the upside-down catfish will spend most of its time swimming inverted—but not on its side. Always research your exact species of catfish to know what's normal for it.