If your ns1.mycompany.com and ns2.mycompany.com shall work as a registered DNS server for the zone example.com, you have to register the domain example.com with your favorite registrar and in the registration process specify that ns1/2.mycompany.com are to be entered as NS for this zone.
As a consequence, the responsible name servers for the com zone will add entries like
@origin com
example NS ns1.mycompany.com.
example NS ns2.mycompany.com.
whence everybody else can learn the fact.
Just in case that the name servers are themselves inside the zone to be served (i.e. you want to configure mycompany.com instead of example.com), you will have to additionally add the fixed IP addresses of the name servers in order to avoid a catch22 problem.
And of course your two name servers should be independently reachable, that is requests for port 53 from the internet should be accepted and they should (for some registrars: they must) reside in different class C networks (i.e. not differ only in the fourth IP address octet)
In your zone data for example.com, you should of course also replicate the fact that your name servers are the authoritative name servers, i.e. there you should have records
@origin example.com.
NS ns1.mycompany.com.
NS ns2.mycompany.com.
and for other reasons possibly also
MX 10 mail.example.com.
mail A 1.2.3.4
www A 5.6.7.8
In Windows DNS server, these NS entries are created if you enter the hosts as name servers in the properties of the zone.
Anyway, the major step is registrartion.