There are two things to consider when buying a phone. Is it unlocked (that just means that it won't ask for the unlock code no matter what carrier or MVNO SIM you put into it -
and does it cover the frequencies of the carrier you're going to use it for, usually the 4G frequencies are the important ones. (And it should support GSM or CDMA, depending on the carrier. Some phones do support both, but most don't.)
So before buying it, ask for the full model number. If it ends in A, it's for AT&T, T is T-Mobile, V is Verizon, P (don't ask me why) is Sprint, and F is European, which sometimes works well with AT&T and T-Mobile. The note 4 comes in CDMA (Sprint and Verizon) and GSM (almost everything else), so you need that last letter - it's an SM-910<something>, and it's the <something> that's important. (And knowing what band the carrier uses in your area - which can be looked up at
https://www.frequencycheck.com/countries ) 2G and 3G are pretty universal (and most carriers don't support 3G any more), but if the phone can't operate on the 4G frequency the carrier uses in your area, you get voice and test (and mo attachments) and no data.
So check the model number
here to see what frequencies the particular phone operates on for 4G, then compare it with the carrier (usually you have to go to the store and ask - moist carriers use only one of the 4G bands they're licensed for in any given area). But if the phone can't use the band the carrier uses, it doesn't matter whether the phone is unlocked. (And the first consideration should be that the carrier you're choosing has solid coverage every place you need coverage. Since dead spots can be as small as a foot or two in diameter, that means at your desk, not in the street in front of the building. Unless you like going outside every time you need to use the phone.)
(And, in the US, as long as the phone is fully paid for, and in some cases even sooner than that, the carrier will give you the unlock code even if the phone is locked - as long as you're using it on the carrier it's designed for [and not on an MVNO].)