I have my domain hosted and I received to two name servers to be updated with my domain registrar ns1.hostingcompany.com ns2.hostingcompany.com , I know if the primary name server goes down DNS server automatically point my domain to the secondary name server but my question is what happens my host's whole system goes down? Since ns1 and ns2 are belong to the same company would my domain resolve to anything ? or can I have ns2 in a different server with a different company? if so how do I configure the ns2 backend ? Thank you
The answer to the main question is "no, they don't". Your two (or, indeed, more) nameservers can (and probably should) be hosted with separate companies, in separate datacentres, preferably served by different network providers.
How you set up your 2ary nameserver is slightly beyond the scope of an SF answer - it depends on what resolver you're running, or if you're going with a name service provider, what interface they provide. But not only is there no bar on hosting the two nameservers far apart from each other, it is best practice to do so.
There is no requirement that your primary and secondary nameservers be run by the same organization, and as Mad Hatter suggests, if you have high availability needs for your domain it's a good idea to design with redundancy in mind.
Any DNS provider worth their salt has probably already done that to some extent -- they may have given you two nameserver names and IP addresses to publish in your NS records but if they are any kind of competent DNS provider that does not mean there are exactly two servers out there and resolution of your domain will cease the minute anything happens to those two individual machines. More likely they are using mechanisms such as dns clustering, load balancing, anycast, and/or other ways of making separate sets of many server instances look and act like two logical servers. They should also have geographical redundancy, multiple network paths, hot spares, etc, and in short it should be very difficult to take out all of a (competent) commercial DNS provider's servers simultaneously.
If you are concerned about being reliant on a single organization, however, there are many options for secondary name service (disclosure: my non-profit employers operate one, SNS@ISC, though it is intended more to provide high-availability secondary service for organizations that are operating their own primaries, as opposed to backup for commercial DNS providers.)
Should the worst happen and your DNS providers' nameservers all be taken out in some sort of network or other crisis, keep in mind that the first symptoms you will see will be inconsistent resolution of your domain names, as some recursive resolvers will have your information in cache and will retain it for up to TTL seconds. During that period where your primary and secondary nameservers are unavailable, people will experience different results trying to resolve your domain depending on whether your records are cached by a nameserver upstream from them.