How do servers/regions work?

How do servers/regions work? Lets say you want to play with friends cross continents

It’s all shared on one server, I’ve seen many a Brazilian player for example. ;3

I figured it out, I was on the wrong block apparently... tenks for the help! :v