Four forms of nationalism:
cultural
ethnic (or racial)
religious
political
Geography and language (geographic and linguistic factors) can play a role in the formation of nations. But when we speak of types of nationalism, we generally refer to ideas around which a nationalist feeling is based.
Ethnic or racial nationalism focuses on shared ethnic identity, seen in common language, racial group, etc.
Political nationalism focuses on loyalty to the political state in which one resides--to its ideology and political system. In its formation, the United States served as an example of this form of nationalism, uniting around a shared idea.
Cultural nationalism sits between ethnic and political nationalism, incorporating features of both. It focuses on shared traditions within a country. Though it may have some connection to ethnic commonality, the greater emphasis is on shared experience and national traditions.
Religious nationalism sees a connection between a particular religious identity and national identity. A Muslim nation that operates under Sharia law would be an example. The United States can also be an example if/when people describe the US as "a Christian nation" and see patriotism aligning with principles of the Christian religion.