Flying in Minecraft is only available in Creative Mode. It can be enabled by modifying the client or server, but the owners of multiplayer servers rarely give this option to players.
Flight benefits
Flying is one and a half times faster than running. It greatly reduces the force of friction, we can say that the flying character slides over the blocks, as if he were on ice. You can fly while in water (or in lava under a potion of fire resistance), while the speed of movement will gradually decrease, but you will not be able to drown.
Flight time, unlike running time, which depends on food depletion, is not limited by anything. You can fly as much as you like. You can enter flight mode by pressing the jump key twice. You can decrease and increase the flight height using the squat and jump keys, respectively. Pressing the jump key twice will take the player out of airplane mode.
If there are any solid blocks close to the character's head, problems may arise with both entering and exiting flight mode. To eliminate such problems, it is enough to go down below or destroy interfering blocks.
Flight mode is automatically disabled if the character touches the surface under his feet or simply flies too close to it, this does not touch the liquid under his feet, but when flying over the lava, you need to act as carefully as possible, since accidentally touching this liquid will set the character on fire. Of course, this only applies to flying in Survival mode with a modified client or server, since in Creative mode the characters are immortal.
Some nuances
In airplane mode, the draw range is increased by ten blocks. To know if you are in this mode or not, just look at the Moon or the Sun, as their size changes as you fly.
If you go to bed or sit in a trolley while flying, you will continue to fly after exiting them.
On most servers, airplane mode is disabled, so if your client is modified for flight and you use it in a multiplayer game, the server administration can simply disconnect you from the game for a while or permanently.
If your computer is not very powerful, the game may slow down when entering and exiting airplane mode. To get rid of such problems, it is enough to reduce the drawing distance in the video settings, disable clouds and other optional functions.
In the game, the fastest way is to move if you drink a potion that increases the speed of movement, then scatter (by pressing the forward button twice) and take off.
In some cases, too high an altitude can slow down the speed of horizontal movement, it is enough to decrease a little for this problem to disappear.