The game as a whole is made simpler and more coherent if it is only possible to move forward when attacking, and this requires that it not be possible to move forward when defending. To be attacking, a team must have possession, one way or another. The exception is backward movement made as part of the attack, i.e. the snap and any backward passes or runs: the attacking team sacrifices territory now in order to gain territory in several seconds.
Each attempt at moving the ball forward is called a down. A down ends when the player with the ball is tackled (see further definition later) or leaves the field of play, some kind of score occurs, a pass is incomplete, or the player in possession stops making forward progress. Note that
the down ends, the ball is dead, and no further "in play" action can occur from that exact instant, even if it is not known until some time later when precisely the instant was;
the ball is placed for the next down based on its position when the down ends, and not for example when a defender first made contact with the attacker or when the attacker first took possession.
In the case of a player moving backwards, the player stops making forward progress because they have begun doing the opposite.
In the case of a player falling forward, a tackle requires that some part besides the hand or foot of the player in possession has touched the ground (or any part of that player or the ball has touched an object or ground outside the field). Since the player is still making forward progress, every inch of territory gained until the down has actually ended must be counted.