I understand according to the rules for flying that
If a flying creature is knocked prone, has its speed reduced to 0, or is otherwise deprived of the ability to move, the creature falls, unless it has the ability to hover or it is being held aloft by magic, such as the fly spell.
However, my question is when the flying creature is given the prone status when does it begin to fall, and how far does it fall?
an example is as follows:
A 3rd level Battlemaster Fighter confirms a hit on a Harpy flying 30ft above the ground. The Battlemaster then expends a superiority die to use their trip attack, the harpy then fails its strength save and is knocked prone.