I have seen this one a few times and it’s always entertaining to watch and hard to fix.
Lets say you have a domain name of company.com.xx and you host it yourself. The primary is stored on your DNS server in your DMZ and the secondary with your ISP.
Now someone in your country will be hosting the .com.xx records. They will have a DNS server with a listing of delegations, that is who is responsible for sub-domains under .com.xx like your company.com.xx
This is where it gets interesting. Delegation is done by hostname, not by IP address. In this case it will be delegated to something like NS1.company.com.xx and NS2.YourISP.com.xx