Put simply: pronunciation, vocabulary, and habits.
Pronunciation is usually the first thing you notice. A Spaniard, a Cuban, and an Argentine all speak the same language, but the difference is easy to hear.
Then come the words.
Even something as ordinary as a bus, a phone, or a food item may have different names in two countries. Both versions can be perfectly correct.
Another topic is tú, vos, and usted. On paper, it may look a little confusing. In real conversations, you quickly understand what people normally use in that particular country.
And then there is slang. There is no escaping it.
Slang is often what makes someone with a solid B1 or B2 level stare at the other person in confusion. The words seem familiar, the grammar seems familiar, but somehow the meaning has disappeared.
That happens to everyone.
So there is no real point in trying to learn every variety of Spanish in advance. It is much more useful to build a strong foundation and listen to speakers from different countries. Mexican series, Argentine interviews, videos from Spain, Colombian podcasts — all of this trains your ear much better than trying to memorize a list of hundreds of regional differences.
After a while, something interesting happens: you start guessing the country from the accent.
And Spanish no longer feels like one strict, “correct” language. It starts to feel more like a large family of varieties that are always slightly different from one another, yet still remain mutually understandable.