So this is actually a very interesting tale, and one that is surprisingly reliant upon the proclivities and preferences of a small group of Ivy League students and alumni in the 1800's.
Individual schools in the US had inherited from England a whole assortment of centuries old traditions of foot-ball games that were essentially proto-soccer, with maybe some catching or even running, but still not Rugby, undergoing its own origin. Harvard for instance had to ban their annual Freshman vs Upperclassmen foot-ball game because it became simple hazing.
And in the mid 1800's backed by rises in free time, and Muscular Christianity, and more young men in school, interest in sport grew. Thus we had a breakthrough in the fall of 1869 when the men of Rutgers invited their fellows from down the road in Princeton for a go. They spent the day carousing and drinking and playing billiards, then in the afternoon played a game by Rutgers' house rules, a 6-4 Scarlet Knights victory. Then a few weeks later Princeton hosted another game to an 8-0 Tigers win.
That was how the game and the practice of playing intercollegiate games went on for a few years, basically an offshoot of primitive soccer. Until in 1874 McGill University from Canada came to Harvard for a series. However by then the Canadians had picked up a taste for Rugby and got the Crimson onboard too. Students from Yale and Princeton were also in attendance and became converts as well.
Then in 1876 reps from Harvard, Yale, Columbia, and Princeton agreed to use a common set of rules, to play annually round robin, and name a champion. The formation of competitive play and the Ivy League.
in 1878 then the Captain of Yale's team, the great Walter Camp, instituted the change that would fully separate Gridiron from its inspirations. He proposed changing from Scrummage to Scrimmage. Where the offense would retain possession between dead balls and simply start play again. This was refined in 1882 by his proposal for Downs, originally giving 3 downs to get 5 yards.
While still very different than the modern game by the early 1880's Gridiron Football had completely separated from its cousins. Later adjustments to scoring, down and distance, and allowed plays would follow over the years. With the real final watershed being in 1905 with the formation of the NCAA and the legalization of the forward pass.
A solid read of the early history of the sport is The Opening Kickoff by Dave Revsine, currently with the Big Ten Network.