It iss a term also used to justify a real or imagined historic tie as well. Ethnicity goes far beyond the modern ties of a person to a particular nation (e.g., citizenship), and focuses more upon the connection to a perceived shared past and culture. See also Romanticism, folklore.
The 19th century saw the development of the political ideology of ethnic nationalism, when the concept of race was tied to nationalism first by German theorists, including Johann Gottfried von Herder. The cases where a focus on ethnic ties to the exclusion of history or historical context has arguably resulted in an almost fanatical self-justifying nationalist and or imperialist goal.
An example of this is the expansion of the German Empire and the Third Reich, based on the theory that these governments were only re-possessing lands that had "always" been German, and the current struggle in the Balkans.
The term "ethnicity" may also be used to refer to a particular ethnic group: "People of various ethnicities."