The 4th of July celebrates the date that representatives of the English colonies signed the Declaration of Independence in Philadelphia. This document broke the ties with Great Britain and marked the beginning of the United States of America as a country.
The war of independence had begun earlier and continued for seven more years before Great Britain recognized the independence of its former colonies.