Not really a celebration of winning a national war. While President Lincoln did proclaim it a national holiday during the American civil war (which wasn't decided or won yet), it wasn't to celebrate the war at all. It's just a day that we Americans are supposed to pause and give thanks for the things we have, not material things, but things like our freedom, health, family, etc....
Well really, the whole thing is based on the idea the the pilgrams "gave thanks" during one of the first years that they were after a really good harvest. Generally the Native American (Indians) get mixed it too and it's said that the pilgrams were also celebrating because the Native Americans showed them what crops to grow and what food to forage. So basically it was a feast held by the Pilgrams to be thankful for a good feast and to the Native Amercians for their help.
I'm not sure how much of that is true, but that's the general idea they teach to the children.
Pulled from that article above:
The event that Americans commonly call the "First Thanksgiving" was celebrated by the Pilgrims after their first harvest in the New World in 1621.[2] This feast lasted three days, and it was attended by 90 Native Americans (as accounted by attendee Edward Winslow)[3] and 53 Pilgrims.[4] The New England colonists were accustomed to regularly celebrating "thanksgivings"—days of prayer thanking God for blessings such as military victory or the end of a drought.[5]