The main advantages of flying troops in medieval warfare would be as follows;
mobility. The ability to travel over most terrain reliably without the need for roads would make even a small troop invaluable. It would increase the flow of information, decrease the predictability of attack patterns, and make moving over ground without air defense less safe.
stealth. An army marching together makes a lot of noise, draws a lot of attention, and tend to be easy to look for, especially given their reliance on roads. A flying squadron could hide their presence far easier, and would leave behind far less in the way of tracks to follow than soldiers on foot or horseback.
weapon variety. Siege warfare already involves a great number of weapons that depend upon gravity - dropping burning sand, boiling oil, or just rocks from castle walls onto invaders. Surely a great deal of similar weapons would be developed and honed to perfection to allow a flying squadron to attack from above and retreat to a base where more ammunition awaited them. Of course, fliers with bows and arrows is probably going to be the main option, but the weird, creative ones will also see use.
targeting capability. From above, fliers would be able to zero in on important figures in the enemy line-up, whether that was nobility they wished to kill or capture for ransom, officers who gave orders to the infantry, or couriers or flag bearers who might signal those orders. They could also as a group target one particular part of an army, possible a reserve or reinforcement troop, and try to force them out of position.
With all of this in mind, what defenses might be developed?
The first and most obvious is an increase in ranged weaponry. Archery would become invaluable, and the use of cheaper weapons like slings and spear-throwers might remain in the armory for longer. Super long spears and throwing spears, both of which were common in bronze age warfare but didn't survive to iron age, might still see use to stop low fliers. However, if a person can fly in plate armor (which they probably can) then at some point, they will, and for that, crossbows and longbows might the only reliable weapon.
Other tactics might prove useful, however. Building bonfires to provide large clouds of smoke might make the air difficult to fly through. Training birds like hawks and falcons to harass flying humans could be more useful than trying to take them out by hand - flying is usually a difficult and dangerous undertaking, and magical flying is probably no different. Little distractions might do a lot of damage if they lead the flier to lose their balance or their nerve.
Catapults and ballista might also be retooled so as to shoot nets, or shotgun-style loads of debris. This would probably be used sparingly, since you don't want that stuff to then fall on your own troops - these weapons would be best employed by castles and by troops while they were moving, not so much in actual battles.
Passive defenses will also develop. This would likely include armor, especially helmets, designed to protect from above. Roman-style shield formations for infantry would stay in style, and siege towers or mobile defense huts like the ones they put around battering rams might see use in other contexts. Likely, the officers will use contraptions like these to relay their orders during battle, waving flags or tooting horns from a more defensible, fortified construction rather than a sitting duck on the field. As for Castles, they will have to have intricately built roofs, able to defend against things being dropped or thrown at the ramparts but incapable of having someone fly onto or over them without being seen.
There will also be some accommodations made to promote the use of friendly fliers - lighthouses on land, to make flying by night possible (and make sneaking around at night less possible). Towers and forts with drawbridge-style openings high up in the walls, to allow for quick bombing sorties from well stocked rooms.
Remember, if this gift has always existed, this has always been a part of combat. By the iron age, these techniques will be highly developed by a long military history, and military technology will reflect those developments. Fliers probably have aerodynamic armor, may even have something like a parachute if falling from the sky is a risk.
This seems to me like good summary of some of the main effects flying humans might have on iron age warfare. However, as a parting thought, here are some musings on the societal effects.
In medieval Europe in particular, the military advantages offered by horseback riding resulted in the existence of the nobility. Mounted Knights who served alongside Charlemagne were given grants of land to secure their loyalty. A later Carolingian King eventually made the ownership of that land hereditary, tying the families of those knights to the king. This created a system where the knight's family acted as landlords, pushing their serfs to farm the land and then using the profit from this to fund all the necessary training and equipment to guarantee a mounted warrior for the crown. In particular, the raising and training of the horses would have been a great expense. However, because of the power cavalry offered, this system successfully spread across Europe.
Because the gift of flight is not hereditary, kings would not be able to guarantee themselves the use of a flying knight by ennobling that knight's family. Other incentives would have to be used - if anyone can be born with this power, society must make allowances for anyone to be capable of rising in status if they are found with the power. Hereditary nobility may not exist. At the very least, I think that the caste system of this world may end up noticeably more fluid, at least on the surface.