This would depend on the domain name you would like to register.
.Africa domains for example can be registered by anyone, located in any country around the world. The same apply to most TLD (Top Level Domains) llike .COM .NET .ORG
Note however that some countries put a restriction on who may register domain names associated with it. For example, .EU domain names can only be registered by a Registrant that resides in Europe.