A nation is a group of people who feel unified, and are distinct. A nation-state is internationally recognized. It must have political and geographic boundaries that define that nation.
By these definitions, a Mexican political party may be described as a nation, but Mexico is the nation-state.
Nationalism can unify a nation/nation-state by showing us our common goals and interests/beliefs. It makes communication easier by use of language, and ca give people a sense of connection and security.
In some cases, nationalism ca create an US vs THEM mindset. It can lead to a competition for power and resources. It also causes things such as scapegoating. 'Scategoat' comes from a Jewish term, where the Jews would put their all their sins on a goat. A scapegoat is one blamed for wrongdoings. It also creates tribalism, and ultranationalism, which can lead to genocides.
Some countries are civic nationalist countries.
Countries that are civic nationalist aim to accept all current residents of the nation, whether it's race, culture, religious belief, etc., with no exceptions.
Civic nationalism is possible when the peoples in a nation-state agree to comply to the same laws.