What exactly is an unlocked iPhone? - 1

I want to buy an iPhone in Japan, but I'll return home next year. So I want to keep using it in Europe.
I googled this and they said it was possible if I buy an unlocked iPhone.

Do you know what this is? And do I have to do something special when returning to Europe?

One that's not locked.

A unlocked phone means it can support any gsm sim in any country

Unlocked just means it is able to be used on any carrier in the world vs locked ones which is just 1.

Other than swapping SIM between the countries, nothing.