I don't completely agree with the above posts, as Yorktown was a pretty decisive victory on the part of the Americans. That being said, the British were often their own worst enemies. They staged a rather brutal invasion of the Carolinas - colonies that were full of loyalists - and through their tactics recruited people for the rebellion.
The British employed thousands of Hessian mercenaries that were also quite brutal to Americans soldiers, murdering them after they had surrendered. These stories helped convince people that the revolution was justified.
Lastly, there was a significant number of loyalist Americans who willingly fought on the British side. They were treated as a secondary militia when, given their knowledge of the people and territory, they could have been used as a much more effective fighting force.
These are just a few examples of how the British lost the war.