Patriotism - love for or devotion to one's country
Nationalism -: loyalty and devotion to a nation; especially: a sense of national consciousness exalting one nation above all others and placing primary emphasis on promotion of its culture and interests as opposed to those of other nations or supranational groups
Love - (1): strong affection for another arising out of kinship or personal ties
(3) : affection based on admiration, benevolence, or common interests
Loyal - unswerving in allegiance
*All Definitions from the Merriam-Webster Dictionary
I started with the definitions because they highlight the distinction between patriotism and nationalism.
On a deeper level, this is about the difference between feeling love and feeling loyal.
A patriot loves his country, whereas a nationalist is loyal to his nation. Moreover, a patriot's love for his country because he is proud of what it does and what it can do, while a nationalist's loyalty is unswerving in allegiance, which means that it doesn't change regardless of their nation's actions.
Patriots do what they can to make their country better because they take pride in what their country does. Nationalists take pride in their nation because of what it is.
From a leadership standpoint, leaders that preach patriotism try to unify their people to solve problems, while leaders that preach nationalism try to divide people into "their" people and other people, with the other people being the problem. This is because a patriot believes that the people make the country, whereas a nationalist believe that the nation makes the people.
The result of those mentalities are patriots that have a love for all people within the borders of his country and nationalists that are against all people who are not within their nation. One group focuses on the ties that bind us and the other focuses on the things that separate us.
This logic then follows that a patriot believes in the principles of his country, but not necessarily its government or its leaders, as the people's values and beliefs tend to be more in line with principles, hence why the people go to and love the country. A nationalist believes in its government and its leaders, but not necessarily its principles, because the government and its leaders represent the nation that they are loyal to.
The United States is fundamentally both.
We are one of the most patriotic nations on Earth, and that statement alone highlights the fact that we identify with both ideologies. We show love for our country when we fight for our country at home and abroad, yet we are taught as children to pledge allegiance to the flag, which falls in-line with the nationalist ideology.
Patriotism and nationalism do not perfectly overlap, but they are not diametrically opposed either. The United States needs parts of both ideologies to survive as a country.
If we only follow patriotic ideologies, then anarchy would ensure every election because any no candidate truly embodies every principle that the United States stands for, since we have political parties one side would always feel that the other betrays the American principles (regardless of which side you think is right and which side you think is wrong).
If we only follow nationalist ideologies, then we end up with something akin to the Nazis. Nazism is literally the ideology and practice of the Nazis, especially the policy of racist nationalism, national expansion, and state control of the economy. Nazism isn't a guaranteed outcome of nationalism, it can also end-up with isolationism, fascism, or any similar -ism, but is a possibility that cannot be ignored.
Ideally, we should have a nation that we love and are loyal to, with a country that tries to unify all people, not divides them.
Remember the words of our Pledge of Allegiance:
"I pledge allegiance to the Flag of the United States of America, and to the Republic for which it stands, one Nation under God, indivisible, with liberty and justice for all."
This is one of our fundamental showings of loyalty to the United States of America, but as patriots we must ensure that those words have meaning.
We can't merely show loyalty and feel love. We can't merely show love and feel loyalty. We must show both and feel both to ensure "liberty and justice for all."