You may have seen that websites generally have .com as domain extension. Do you know the meaning of .com ? It stands for commercial and is recognized worldwide. Earlier, it was mostly used by the companies rather than the other domain extensions.
Internet Corporation for Assigned Names and Numbers (ICANN) controls the .com domain extension. ICANN gave the control of technical operations to Verisign and people can buy .com domain from different registrars like godaddy, namecheap, etc..
A Domain name has two parts : one is the list of characters called second-level domain and the other is the domain ending such as .com. Some domains refer to specific countries like .fr refers to France, .in refers to India, etc..
So, finally you will think which domain extension should be preferred. It depends majorly on the type of company or organization, but .com is generally preferred in most cases. Companies who target the audience of a specific country they use country codes as domain endings. Besides all of these, a website's success doesnot primarily depend on the domain extensions.