America declared independence from Britain and fought a war of independence. Several states joined the fight, however, Canada remained British. Why did the American rebellion and war of independence not spread to Canada?
Short Answer: The Canadiens were tired of war and content with British rule.
Twenty-some years before the American Revolution (1754), which was just before the Seven Years War, this is what the map of British Colonies looked like: Only a few areas of modern-day Canada were British then: Nova-Scotia, Labrador-Newfoundland, and around James' Bay & Hudson's Bay. Quebec extended south to below Niagara falls.
The 13 American Colonies were centered around New-York City:
1.) Geographic Separation caused the English speaking British colonies north of Maine to be culturally distinct from the 13 American Colonies. The people of Nova Scotia were half New Englanders and half Germans, Highlanders, Ulstermen and Yorkshiremen. Nova Scotia wished to remain neutral. British Naval power and a British Garrison at Halifax prevented any serious American attempt at invasion. In 1777 Nova-Scotian outposts came under attack from New England privateers seeking plunder. That caused even former New-Englanders to form militias and defend their homes. Soon thereafter the New Light religious movement (Great Awakening) started by Henry Alline of Rhode Island swept through New England and Nova Scotia turning attention away from politics.
2.) Acceptance of British Rule: When New France fell in 1760, the defeated armies, French officials, some seigneurs, and some merchants returned to France. British credit, currency, and markets such as London was what mattered--not Paris or America. The British successfully implemented representative government in Quebec through respecting the religious freedoms of Catholics and recognizing the political value of the Catholic Church, which was backed by a dutiful French populace that contrasted sharply with the restive 13 American colonies.
3.) The Quebec Act of 1774 satisfied Quebec and angered the American colonies. It allowed English criminal law to exist in parallel with French civil law and the entrenched seigneurial system. Quebec even had a (legal) mandatory tithe to the Catholic Church, which only concerned Catholics.
The Quebec Act also expanded the province of Quebec to include Labrador in the East and extended the Western boundary to the junction of the Ohio and Mississippi rivers all the way north to Rupert's Land. This expansion had the obvious intent of funneling the fur-trading areas serviced through the St. Lawrence into the jurisdiction of Quebec. The land was mainly Indian territory (where the Indians were allied with the French) that was exploitable for the fur trade without endangering Indian land rights and risking war.
American colonists desired to settle these native lands, and therefore listed the Quebec Act as one of the "Insufferable Acts." Furthermore, the accommodations given to Catholic religious practice angered and frightened the fiercely anti-Catholic Americans, who often viewed the Anglican British as in league with Catholics. In fact, the Dominion of New England ended, and the New England colonies separated administratively again, after the Anglican royal governor was overthrown amid rumors that the governor was planning to take over the area in the name of the Pope.
4.) Cultural and Religious Isolation: Quebec was the largest British colony in what is now Canada. The language barrier combined with the foreign religion of French Quebec and the history of hostilities from the Seven Years War caused Americans to view the people of Quebec as foes.
5.) Patriot attacks on Canadiens solidified opposition to the American revolution. American Patriot generals Richard Montgomery and Benedit Arnold Attacked Quebec in an attempt to seize Canada from British control (1775). They took Montreal and laid siege (ultimately unsuccessfully) to Quebec City, where British regulars and a few Canadien militia defended. The Americans were ill-supplied but stayed till spring, when the British navy sailed up the St. Lawrence.
It also became true that in the wartime alliance reached in 1778 between France and the young American republic, neither partner really wanted to see the other established at Quebec, preferring to have it left to Britain rather than that either of the two new "friends" should hold it.
6.) Economic Interests: The merchants of British North-America benefited from the influx of British troops (and money) which powered the offense south from Quebec. The Canadians also profited from access to the tariff-protected British markets, which far larger New England competitors had forfeited through the act of war. The fur market in particular began to thrive in Canada. The British Navy on the Atlantic and by British military power in the interior both guarded the fur trade.
Businessmen came to recognize that their economic stake in the imperial system far outweighed any political discontent over the Quebec Act -- and that Act, after all had re-attached the valuable southwest fur domains to Canada. Hence the merchants' sense of commitment increased with the flow of trade on into the 1780s; as they saw that their St. Lawrence commercial realm was tied both to Britain and to Canada's own growth westward. Factors of geography and business interest in effect were shaping the prime leaders of Montreal into British imperialists and Canadian economic nationalists combined.
7.) Many Loyalists moved to Canada to support the British cause. .
Conclusion: pardon the quotes
As for the mass of French Canadians in the province (of Quebec), they began to follow their seigneurial and clerical elites into their own commitment to the British side. Naturally the Canadiens still put their distinct community concerns and heritage first; yet they also concluded that the Americans should not be welcomed, but kept outside. The self-proclaimed republican "liberators" had simply turned out to be the same old enemies, les Bostonnais, the Puritans of New England: stabling horses in Catholic churches during their invasion, paying in worthless paper money for crops and supplies seized from habitant farms. The Canadiens did not learn to love their British conquerors as a result -- why should they? -- but did grow to believe that they were better off with them. For the provisions of the Quebec Act had guaranteed French Canada's own special rights and character under British rule: guarantees which the Americans certainly would not have given. Instead angry American outcries had greeted the Act because of the very grants it had made to the "French Papists". Thus for different but historically sound reasons, neither the Francophone and Anglophone communities of Quebec province took to the American path of revolution. They stayed within the remaining British empire -- above all, to avoid being swallowed up in another emerging empire, that of the United States.
St. Johns, PEI, and Newfoundland
The little neighbouring Atlantic province, the Island of St. John, was hardly likely to affect the course of empires. It certainly continued in British keeping -- although an American privateer raid on Charlottetown in 1775 carried the acting governor and two officials off to General Washington, who did not want them, and sent them home. The big island of Newfoundland also suffered, and more harshly, from American privateering ravages. But here British garrisons and naval squadrons still blocked any real threat to imperial control. In any case, the war years brought the island flourishing times in its essential cod fishery, particularly for residents, since many of the visiting overseas fishermen had been drafted into the Royal Navy. Thus Newfoundland, too, stayed surely within Britain's American empire.
Great Lake Indians
At the other, western end of empire, war spread through the inland forests below the Great Lakes, from the Iroquois country to the Ohio and Michigan wilderness. In the upper reaches of New York province, patriot rebel forces contended fiercely with units raised from loyal-minded settlers in the area. But further, the Six Nations Iroquois and their traditional homelands were heavily involved. The Tuscaroras and Oneidas largely sided with the Americans. The rest of the Six Nations, and especially the Mohawks, supported the British; for here old bonds of alliance held strong. They had been well forged under Sir William Johnson as Indian Superintendent till his death in 1774, to be maintained thereafter by his son and heir, Sir John Johnson, later to become Superintendent in his own right.
For the most in-depth discussion of this topic I could find see this Canadian Heritage Book (free), which is the source of the quotes and much of the content in this answer.
After the Stamp Tax in 1765, the 13 colonies set up "committees of correspondence," whereby leading members of one colony commiserated with leading members of other colonies about British (mis) rule. These leaders later formed a "Continental Congress." As a result, the 13 colonies developed a certain common "consciousness." When a few of them (e.g. Massachusetts) rebelled, they all did. The Declaration of Independence refers to "the Representatives of the United States of America in General Congress."
"Canada" was not part of this "bonding" process. Instead, it was invaded by "Americans" and called to join the common rebellion against the mother country. But in fact, a lot of the measures that Britain had taken against "Americans" in the previous decade were actually meant to protect "Canadians," who were much less dissatisfied with British rule.
So unlike say, Georgia and Massachusetts, "Canadians" didn't look on "Americans" as fellow colonists, but rather as "other" invaders who spoke English. (And France had not yet allied with America, so there was no incentive for French speakers to support the "Americans."
In the end, the choice for the Canadians probably boiled down to "better the devil we know that the one we don't know."
It did. In a number of unexpected ways, specifically the exile of Patriot Tories, slaves that fought for King George and a number of refugees that sought sanctuary. It became a global war in some respects. You might like to read more about the 'Tories' that fought for the Crown rather than independence and the compensation for ex Tories who resettled in the USA.