You can find the domain registrar by querying the WHOIS database(s). There are actually multiple databases, depending on the Top Level Domain (TLD). For example, .com and .net are handled by Verisign. There are a handful of RFCs that describe how to query this information, along with a number of available tools that can act as a front-end for you.
For example, if you have access to a Unix or Linux command line, you can use the
$ whois example.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: EXAMPLE.COM
Registrar: RESERVED-INTERNET ASSIGNED NUMBERS AUTHORITY
Whois Server: whois.iana.org
Referral URL: http://res-dom.iana.org
Name Server: A.IANA-SERVERS.NET
Name Server: B.IANA-SERVERS.NET
Updated Date: 26-mar-2004
Creation Date: 14-aug-1995
Expiration Date: 13-aug-2011
Last update of whois database: Mon, 01 Nov 2010 16:21:30 UTC
[. . .]
The Registry database contains ONLY .COM, .NET, .EDU domains and
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
organisation: Internet Assigned Numbers Authority
If you don't have access to a Unix/Linux command line, you can use a large number of online web interfaces to the WHOIS database. Googling for 'whois' will turn up numerous options.
Finding the webhost for a website is significantly more difficult. You can find out who owns the IP address space using the same
whois command as above, and querying the appropriate IP database. For example, to look up 192.168.1.1, I might do:
$ whois 192.168.1.1
# Query terms are ambiguous. The query is assumed to be:
# "n 192.168.1.1"
# Use "?" to get help.
# The following results may also be obtained via:
NetRange: 192.168.0.0 - 192.168.255.255
NetType: IANA Special Use
Comment: This block is used as private address space.
Comment: Addresses from this block can be used by
Comment: anyone without any need to coordinate with
Comment: IANA or an Internet registry. Addresses from
Comment: this block are used in multiple, separately
Comment: operated networks.
Comment: This block was assigned by the IETF in the
Comment: Best Current Practice document, RFC 1918
Comment: which can be found at:
OrgName: Internet Assigned Numbers Authority
Address: 4676 Admiralty Way, Suite 330
City: Marina del Rey
OrgTechName: Internet Corporation for Assigned Names and Number
OrgAbuseName: Internet Corporation for Assigned Names and Number
# available at: https://www.arin.net/whois_tou.html
However, that just tells you who owns the IP address space, and is not a guarantee of anything else. That address space might belong to a company that hosts their own web server, or it might belong to a hosting company that hosts a website for someone else (or multiple websites on that IP, for multiple customers). Additionally, the IP address space might be owned by an ISP, and leased/used by a company. Many, many options, and very little certainty, for this.