There are different ways you can communicate to sql server:
1. Shared memory: on the local server
2. Named Pipe: over LAN
3. TCP/IP : on internet
The detail on this is on below link:
using ODBC connection you can use TPC/IP or named pipe protocol.
Sql server uses OLEDB to communicate between relational engine and Storage engine.