First, please note that the American colonists did not win their independence in 1776. That was the year in which they declared independence. The war still went on for a few years after that before the US could really be said to have been an independent country.
That said, the US won independence in two main ways. The first thing that the US did that allowed it to win independence was to get help from France. France was England’s major rival in the world at that time and France wanted to hurt England. Therefore, the French gave military and financial help to the colonists. It is likely that the colonists could not have won without that help.
Second, we can say that the colonists won independence by outlasting the British. The colonists did not actually defeat the entire British military and drive it out of North America. Instead, the colonists simply held on long enough, managing not to lose, until the British decided that the war was no longer worth the cost.
So, when the US did win independence, it did so by outlasting the British, largely using military and financial assistance from France.