The term "Yankee" is used in different meanings which are closely related. The exact sense is understood only with some context or information about the speaker provided.

In the US the term is used to describe people from the northeast and the ones whose ancestors were colonial New England settlers. Sometimes American call such people "Yankees" even if they live somewhere else. The dialect of New England is also called "Yankee".

People from the southern states of America call all the people from the North "Yankees". Such usage originates from the times of the American Civil War. In New England itself the word takes a narrower meaning, referring to old-stock New Englanders of English descent. This way, people who are called Yankees by the rest of Americans use the term to describe a smaller group of people.

In the rest of the world the word is used to refer to all the people of the US, no matter where they live and who their ancestors were.

More Info: en.wikipedia.org