Patriotism is simply loyalty to some sort of civic entity. It can be a nation, or it can be a city, a duchy, a kingdom, an empire, etc. One can be a patriot of France, or a patriot of the Habsburg Empire, etc.
Nationalism is a specific modern concept that humans form like-minded communities that are the basis of legitimate governance. Governments drawn from outside the community possess certain mental qualities which make it impossible to govern other communities in fairness and dignity, because they cannot bridge these mental/cultural gaps.
It can be associated with Democracy, Authoritarianism, Socialism or just about any other form of government. Or even a rejection of government. Nationalism, in short, is the idea that France should be governed by the French, and for the French, while Italy should be governed by the Italians, and for the Italians. If this seems common sense to you, this is because nationalism is by far the most widely accepted political ideology on the planet. It was unknown to the world 3 centuries ago, but during the 19th century it spread to just about every corner of the world.