Rugby and American football are both offshoots of what we call soccer, which is actually officially called "association football". Rugby's proper name is "rugby football" and American football's original name was "gridiron football." All three originated from variations of similar games that have existed since ancient times in many different cultures. The term "football" actually has nothing to do with the body parts used to move the ball. It actually refers to the fact that the games are played on foot rather than on horseback. So the direct answer would be that all three of them are forms of football.
The modern version of rugby came about when some teams split over tightened soccer rules that eliminated the use of hands in the mid-1800's. The American version of football was primarily played by colleges when it first came about and was mostly an intramural game in which students from the same school played each other. While some colleges adhered to rules similar to soccer others adhered to rules similar to rugby. Once interplay between schools became more common the schools set about to create a unified system of rules. Because most of the more prominent schools played the rugby style rules, "gridiron football" took on many of the characterizations of rugby initially.
Over the years rugby football became just rugby in popular reference and gridiron football came to be referred to as simply football (the original gridiron was replaced by the system of lines and hashmarks to mark the field fairly early on). Similarly, association football is generally referred to as just football, except in America where soccer, which originated as a shortening of the word "association," is used