Apple sells particular versions of its hardware in different countries and regions around the world. For iPhones, it has to do with the cellular frequencies in use by carriers. For laptops and other computers, it’s about the built-in or USB-connected keyboard.
But can you use any model of iPhone with any model of Mac? Generally, the answer is yes. Apple doesn’t lock devices by country or region to each other. A German phone doesn’t need a German MacBook Pro (although a German keyboard may be tricky for a non-German speaker to master).
As long as an iPhone is unlocked, it can be used with any carrier. Swap in a SIM for another network, and you can be up and running—a common tactic for travelers who want to get local cellular pricing when they travel among different countries.
Phones brought across regions might not work at the highest potential speed if they don’t support all the 4G LTE frequency ranges in the local area, however. You can find out more about LTE cellular compatibility by country at a page in which Apple exhaustively details support. You can also check which region your phone is designed for by looking for its product ID on this iPhone model number page. (The exception, however, is that you need to buy the U.S./Canada model of iPhone to use it with Verizon and Sprint, which rely on an older standard, CDMA, for their 2G and 3G networks.)
Macs can be used worldwide without any limitation, as the operating system is universal, allowing switching languages, scripts (the characters of a language, which may be used among multiple languages), keyboard inputs, currency units, and other elements in software.
The catch: Apple ID
To access Apple’s services fully, particularly paid subscriptions and purchased media and apps, both devices have to share the same Apple ID for iCloud or Apple stores or both. Apple IDs are essentially country locked, and have limits on how often they may be switched among different countries.
Frequent travelers may want to maintain separate Apple IDs with payment addresses in each country they regularly stay in—though that’s not much of an issue as I write this.