In many ways, aerial combat is the same as combat on the ground, but it differs in a number of key respects. First and foremost, of course, it is three-dimensional. Attacks can come from below - in which case the attacker fights with a -2 penalty due to the inherent awkwardness and disadvantage. They can also come from above, in which case the attacker receives a +2 bonus to-hit - but this is only possible if they are using natural weapons or long weapons such as lances.
The weather also has a great effect on movement in the air. Rain, snow or strong winds reduces movement speed by half, while a storm or gale reduces movement speed by 75%. Even if the weather is calm, flying is a constant effort for creatures that fly by nonmagical means: winged creatures that are reduced to half-health or less must immediately find a place to land, or a crash landing is inevitable.
In aerial combat, every creature has a maneuverability class (separate from their raw speed) which determines how graceful a flier they are. This is the main way in which combat in the air differs from a terrestrial melee. Only creatures that magically fly will be able to hover in place and have a traditional swordfight in mid-air; for creatures with wings, combat is a matter of making passes at their opponent, then wheeling round to face them.
The more maneuverable creature in aerial melee gets a 1-point bonus to initiative for each class they are separated from their opponent by.
Class A creatures fly by magical means. They can hover, turn on a dime, and fight in any direction - they are virtually impossible to outmaneuver. Combat in the air is identical to combat on the ground for them.
Class B creatures have wings, but can easily hover in place. They do not need to maintain constant forward movement. When attacking, however, they do need to make a pass - they cannot fight while hovering. They can turn 180 degrees in a single round and can make one pass every round.
Class C creatures are average fliers - dragons, normal birds, and flying magic items. They must move at least half their movement rate each round to stay in the air. They can turn 90 degrees in one round and can make one pass every 2 rounds.
Class D creatures are large and slow to reach their maximum speed - such as pegasi. They must move at least half their movement rate each round to stay in the air. They can turn 60 degrees in one round and can make one pass every 3 rounds.
Class E creatures are cumbersome and clumsy fliers. They must move at least half their movement rate each round to stay in the air. They can turn only 30 degrees in one round, changing their course only very slowly. As such, they can only make one pass every 6 rounds.
Flying, Climbing & Diving
Flying horizontally is relatively straightforward; you simply move according to your fly speed. All of the usual rules relating to movement, such as sprinting and charging, apply. If your fly speed is 12, you will usually travel at a speed of 360 feet per round - or 120 feet per round, if you have some reason to be especially slow and careful. Likewise, you can briefly fly at greater speeds - up to 720 feet. Note that if you are flying by magical means, this is not the case - a Fly spell has a fixed speed which you travel at.
Of course, you can also travel up and down. Creatures with a maneuverability Class of A or B can easily travel up and down, but those with Class C or worse must climb ponderously at half their speed (180 feet per round for speed 12).
Diving creatures are considered to be charging, gaining the usual bonuses. You can dive up to double your movement in a single round - so with movement 12, you can dive 720 feet in one round. You can continue to safely dive at this speed indefinitely; accelerating beyond this is possible, increasing your movement speed by the same increment each round - 1440 feet, 2160 feet, and so on until terminal velocity is reached. However, once momentum has been gained in this way, deceleration is at a rate of half your movement speed (i.e. 180 feet) each round until a safe diving speed is reached.
Since creatures taking swipes at each other in the air cannot quite be said to be "engaged in combat", free attacks and disengaging work very differently in aerial combat.
Creatures both faster and more maneuverable than their opponent can always escape without difficulty. The free attack for fleeing a combat is not allowed, since the other flyer is also in motion (probably in the opposite direction).
If you are the same speed or faster, but not more maneuverable, than your opponent, you can break off and simply outrun your opponent. In this case, they do get a free attack. It's not possible to carefully "disengage" at half-speed, like it is on the ground.
If you are slower than your opponent, regardless of whether you are more maneuverable, you must dice for initiative with your opponent. If you lose, you don't manage to escape at all and have wasted your round. If you succeed, you manage to escape, but still suffer a free attack from your enemy.
Note that these rules also apply to repositioning yourself around your opponent. If you are below them, and want to get above them - you can safely do this if you are faster and more maneuverable. Otherwise there is a risk of provoking an attack.