Wikipedia is your friend too.
In the United States
Within the United States, the term Yankee can have a number of different contextually and geographically dependent meanings.
Today Yankee is most often used to refer to a New Englander (in which case it may denote New England puritan and thrifty values) or someone from one of the Mid-Atlantic states. However, within New England, the term is often understood to refer more specifically to old-stock New Englanders of Anglo-Saxon descent, often known as WASPs. The term "Swamp Yankee" is used in rural Rhode Island and eastern Connecticut to refer to Protestant farmers of moderate means and their descendants (as opposed to upper-class Yankees).
In the American South the term is still used as a derisive term for persons from any state north of the Mason-Dixon Line, but the mid-Atlantic states of Maryland and Delaware are somewhat ambiguous cases. Maryland is south of the Mason-Dixon Line, both states were slave states and some portion of their populations shares a greater cultural affinity with the South (especially in rural areas), but neither joined the Confederacy during the U.S. Civil War. Southerners sometimes also apply this as a slur against persons from Kentucky and West Virginia because their states did not join Confederacy.
Since the beginning of the 20th Century, the term has also been used by Americans to refer to the New York Yankees baseball team, or the fans of that team.
In other parts of the world
Outside the United States, especially in the United Kingdom, Australia and New Zealand, Yankee, often shortened to 'Yank', is used as a colloquial term for American. The term was used extensively in these countries during World War I (1914 - 1918) and World War II (1939 - 1945) to refer to American soldiers. "Working for the Yankee dollar" is sometimes heard as a derogatory phrase for someone who is perceived to have 'sold out' to an American corporation in some way. In some parts of the world, particularly in Latin America and East Asia, yankee or yanqui is meant as an insult and is politically associated with anti-Americanism and used in expressions such as "Yankee go home" or "we fight the yanqui, enemy of the humanity" (words from the Sandinista anthem). In Japan the term yankī is used to refer to a youth subculture of bleached blondes who are generally regarded as delinquents and thugs by older generations; general slang for American is amekō.