Magnetic levitation is a topic of interest in physics. Within this noble and holy subject, there is a subtopic called Diamagnetic Levitation:
A substance that is diamagnetic repels a magnetic field. All materials have diamagnetic properties, but the effect is very weak, and is usually overcome by the object's paramagnetic or ferromagnetic properties, which act in the opposite manner. Any material in which the diamagnetic component is stronger will be repelled by a magnet.
And diamagnetic things are defined thus:
Diamagnetic materials are repelled by a magnetic field; an applied magnetic field creates an induced magnetic field in them in the opposite direction, causing a repulsive force. In contrast, paramagnetic and ferromagnetic materials are attracted by a magnetic field. Diamagnetism is a quantum mechanical effect that occurs in all materials; when it is the only contribution to the magnetism, the material is called diamagnetic.
So if your animal is made of diamagnetic materials, and the planet it lives on has a very intense magnetic field, then they can fly indefinitely.
You are probably wondering now what kinds of materials your animal could have in its organism, that would enable it to fly this way. Water is a good candidate, because:
- It is diamagnetic
- Most living things contain are made of water somehow.
Do not trust my ramblings just because I am rambling them. Andre Geim and Sir Michael Berry have been given the most coveted award in Science, the Ig Nobel prize, for levitating a frog (and other animals) using a very strong magnetic field. You can see a video of the experiment here. The frog was mostly unharmed, had just a little fright the poor creature.
Now you may be asking yourself, "how does my creature land?" Well, it can either let go a lot of water, or it can make itself denser. Flying is about making the force lifting you as strong as the force pulling you down. By changing shape and letting go of ballast a creature might manage to control its flight.