My apologies if this is simple, or off-topic for this site: I just wanted to know what goes on in the background when one connects to SQL Server, say, within Management Studio. Just what is it we are connecting to, is it a virtual machine, or some server somewhere? Thanks for any explanations, refs. etc.
Usually, you are making a TCP connection to a remote host.
SSMS would ask your DNS server for the IP address associated with the hostname of the server, then initiate a TCP connection to that address on remote port 1433.
SSMS and MS SQL Server would then begin a conversation using the binary Tabular Data Stream protocol (TDS).
You type a query. SSMS encodes this query into TDS. SQL Server gets it, parses it, runs it, returns some data (encoded in TDS), back to SSMS, which decodes it and displays it on screen.
However, you can also connect to SQL Server installed on the same OS as SSMS, or running in a virtual machine on the same box.