A nation is a community of people formed on the basis of a combination of shared features such as language, history, ethnicity, culture and/or territory. A nation is thus the collective identity of a group of people understood as defined by those features. A nation is generally more overtly political than an ethnic group; it has been described as "a fully mobilized or institutionalized ethnic group". Some nations are equated with ethnic groups (see ethnic nationalism and nation state) and some are equated with an affiliation with a social and political constitution (see civic nationalism and multiculturalism). A nation has also been defined as a cultural-political community that has become conscious of its autonomy, unity and particular interests
Benedict Anderson characterised a nation as an "imagined community", and Paul James sees it as an "abstract community". A nation is an imagined community in the sense that the material conditions exist for imagining extended and shared connections and that it is objectively impersonal, even if each individual in the nation experiences themselves as subjectively part of an embodied unity with others. For the most part, members of a nation remain strangers to each other and will likely never meet. Hence the phrase, "a nation of strangers" used by such writers as American journalist Vance Packard.
The consensus among scholars is that nations are socially constructed and historically contingent. Throughout history, people have had an attachment to their kin group and traditions, territorial authorities and their homeland, but nationalism did not become a prominent ideology until the end of the 18th century. There are three prominent perspectives on nationalism. Primordialism (perennialism), which reflects popular conceptions of nationalism but has largely fallen out of favour among academics, proposes that there have always been nations and that nationalism is a natural phenomenon. Ethnosymbolism explains nationalism as a dynamic, evolutionary phenomenon and stresses the importance of symbols, myths and traditions in the development of nations and nationalism. Modernization theory, which has superseded primordialism as the dominant explanation of nationalism, adopts a constructivist approach and proposes that nationalism emerged due to processes of modernization, such as industrialization, urbanization, and mass education, which made national consciousness possible. Proponents of this latter theory describe nations as "imagined communities" and nationalism as an "invented tradition" in which shared sentiment provides a form of collective identity and binds individuals together in political solidarity. A nation's foundational "story" may be built around a combination of ethnic attributes, values and principles, and may be closely connected to narratives of belonging.

