can someone explain to me what is meant by the word Yankee..in reference to the USA...

of course we've heard it spoken of all our lives but what does it actually mean to Americans..?
From a Southerner by birth AND a Yankee by heritage (my ggg-something grandfather fought for the North during the US Civil War in the 1860's)...
A Yankee is a reference to people who live(d) in the north east of the US during the Civil War and supported the abolishment of slavery. People are under the false assumption that slavery was practiced only in the Southern heavily agricultural states at that time. Not so. Many Yankees owned slaves, too, and there were Southerners who supported the abolition of it. The Civil War, North (manufacturing) against South (agriculture), was not just about slavery; it also was about economics and financial control of assets.
Yankees often referred to Southerners as Rebs (Rebels against the federal government) aka Johnny Reb (I don't know where the "Johnny" came from). Both terms were considered an insult, name calling, at that time. However, each side seemed to be proud of the labels. The War tore families apart and decimated the south's economy. Many Northerners came to the South to take advantage of the financial opportunities and force their political and social views on the southern society, which was quite different from the north ; they were called Carpet Baggers. Even now, the southern economy suffers in comparison to the north.
There are, to this day, many social differences between southerners and northerners. In the north, life is much faster paced, is focused more on financial success (Wall Street and major banks are centered there), whereas in the south, it is slower paced and social mores are focused on family, niceties, politeness, being helpful, etc. When a southerner calls someone a Yankee, the underlying meaning is they are rude, selfish, etc. It is true, in my experience, that as a visitor, you are ignored or treated rudely in places like NY. People who visit the south are surprised at how friendly it is.
It is also true that the best universities are located in the north. Harvard, Yale, et al. As a result, southerners are considered uneducated and stupid. Use the word "Y'all" and you are immediately seen as a stupid dupe. That isn't true but the idea has stuck.
There is much more to this than I can iterate here. I admit that I grew up in the south and have used the word "Yankee" in a negative way, even though we have a history of supporting freedom for all and my ancestors were Yankees who fought against slavery; we are proud of that. I have lived and traveled all over these United States and confirm that, in my personal experiences, Yankees, using the term as it is still used today, tend to be rude and selfish, whereas southerners are very polite, friendly and helpful.
I miss Texas, which btw fought against the abolition of slavery during the War. Strangely, owning slaves in Texas was against the law at the time, a hangover from Mexican rule. But you see, Texans don't like being told what to do so there is that, lol. It was "We don't support owning slaves, but we don't want you telling us we can't." So there.
Then there is the term "Rednecks". Which is another topic, lol.