""Football" is not just soccer (Association Football) or American Football. It is actually a class of games (American, Australian Rules, Rugby League, Rugby Union, Association, Gaelic, Canadian) that all originate from an early 19th century British game played by townsfolk where they tried to move a ball from one end of town to the other via carrying, kicking, or really anything.
It apparently didn't have many rules. Supposedly this game was called football because it was played on foot, as opposed to games played on horseback.
Eventually, the public schools in England started playing a more organized version of this "football," and by the mid 19th century you had two major schools: Association and Rugby. (Apparently some schools in England still play their special brand of football.) A group of schools decided to go with the Association Football rules where kicking was emphasized, while the Rugby School (it's literally called the Rugby School) stuck with their own rules that allowed carrying.
The various forms of football made their way to the Americas, especially the Ivy League universities. I think actually Association Football started off as more popular in the US, but at some point, Harvard made a trip to McGill (a Canadian university) and they were taught some form of Rugby. So they brought it back and it became popular.
In the early 20h century, the Americans and Canadians decided to adopt the forward pass, which really separated the American and Canadian versions of football from the other Rugby variants.
In actuality, the word "football" generally denotes whichever variant of football happens to be popular in the country you're in. So Australians will often refer to Australian Rules football as merely "football," the Irish will often refer to Gaelic football as merely "football," and the Americans will usually refer to American football as merely "football." Canadians it's a bit of a toss up if they're referring to American or Canadian football, though the games are pretty similar.
Also, association football is actually the only variant of football where the ball isn't primarily carried."