Not everyone in the Star Wars universe can fly. Only Jedi and Sith appear to be able to fly for short periods of time. However, they are not quite flying. They are levitating their own bodies.
The Jedi use the Force to levitate themselves in the same way they use telekinesis to move heavy objects. Oftentimes, Jedi use the Force to make long jumps, or Force jumps, that somewhat mimic flying.
In The Clone Wars television series, Anakin Skywalker carries out numerous Force jumps, and these jumps parallel flying.
Luke Skywalker also uses Force Jumps. In The Empire Strikes Back, for example, he flies out of the carbon freeze chamber while fighting Darth Vader in Cloud City.
So, Jedi can use the Force to fly for short periods of time. Force flight takes too much energy to be carried on for a long period of time.
Is There a Jedi/Sith Who Can Fly?
CAN JEDI FLY? Star Wars Explained
Anakin and Luke Skywalker are two Jedi that can fly, or levitate. Other Jedi can too.
For example, Obi-Wan Kenobi demonstrated his ability to Force fly when he flew out of a generator shaft while fighting Darth Maul in Episode I: The Phantom Menace.
During the Galactic Republic, Jedi Master Cohmac Vitus demonstrated a flying-type ability. Vitus floated above the floor while meditating.
As with all Jedi flights, this scene is similar to flying, but is actually levitation. Jedi, even those who had not completed their training like Leia, can levitate themselves.
Like the Jedi, Sith Lords can also use the Force to mimic flying. Since they can use telekinesis to Force Push objects, they can also move themselves.
Like the Jedi, Sith Lords can channel the Force into themselves to fly/levitate as well.
Can Darth Vader Fly?
Darth Vader is the best example of a Sith Lord who can fly by means of levitation. He can levitate for a time, but he does not do so very often.
The Empire Strikes Back provides an example where Vader uses the Force to move around the carbon freeze chamber as if flying.
Among his many powers, Vader can levitate himself to wherever he chooses. He can also cast a pure form of energy around himself for protection and sometimes levitates while forming this Sphere Shield.
Vader can use the Force to fly/levitate, but rarely does so in the Star Wars movies. He usually does not need this power in order to defeat his opponents.
Another explanation for why Vader does not fly has to do with his body and armored suit.
These limbs help bear the weight of his armored suit, but they also slow him down. The weight of his prosthetic limbs and suit placed strain on his remaining joints and impacted his heart.
Vader expends a lot of energy moving and fighting in his suit. It would be difficult to carry out Force flight under such conditions. Remember, using the Force to fly does exhaust a Jedi or Sith.
However, in the XBox Battlefront II game, Vader does fly. When Vader battles, he glides through the air coinciding with his cape extended outward in a flying motion.
Darth Vader is the top example of a Sith with the power to fly/levitate, or to perform Force Flight. Yet, we do not see him use this power in the movies, only in video games.