I hope you are doing fine.
This difference may sound a bit complicated for a non-native and, in fact, it’s something we use almost instinctively (we’ll ALWAYS say “Eu vou para Portugal” and “Eu vou para a Itália”, without thinking too much about it, for example).
When we, natives, face some doubt, the most used rule to determine it is thinking of the phrase “I’m coming back from [that same place]”.
So, if you say “Eu estou voltando DE …”, you won’t use the article in a phrase like “Eu vou para…”.
If you use “Eu estou voltando DO/DA …” then you’ll use it.
Using the above examples, we would always say “Eu estou voltando DA Itália” and “Eu estou voltando DE Portugal”. Do you see the difference?
But, as I said, explaining exactly why certain places ask for an article while others don’t is something harder. I’ve tried to find some explanations and most of the websites conclude that the rule is always using the article for countries, and never use it for cities.
However, as you can see, some cities and countries bring exceptions to these rules. Apparently, there’s no reason for that, and it’s something we gain with practice.
In English, I’ve found this page:
The most voted answer seems to be solid and can probably help you. Take a look and tell us if you still have questions! =)