Protocol :-
In simple words, protocol is a set of pre-defined unique rules / guidelines used by a computer application to "talk" (communicate) with a particular service on the server, computer etc. Protocols are mostly simple text guidelines.
Lets look at an example.
telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-1.99-OpenSSH_4.6p1 FreeBSD-openssh-portable-overwrite-base-4.6.p1
Here we tried to connect to port 22 and got the output for it where the SSH version details and the OS was displayed. Here the protocol text would have been something like "If you connect to me (SSH service), I will display my version and OS listing".
Lets have a look at the TCP/IP protocol, one which we all come across very regularly and understand how it works.
TCP / IP Protocol :-
Transmission Control Protocol/Internet Protocol is the very basic communication language used over the internet. You may also use it as a protocol in an intranet setup. For your computer to directly connect to the internet, a copy of the TCP/IP program (protocol) is required. This is true for all the computers connected to WWW across the world. That's how the exchange happens

This protocol follows OSI (Open Systems Interconnection) standard. Almost all networks in use today are based in some fashion on the OSI. This protocol uses that are in accordance to the mapping provided by the OSI model.
I.Network Interface.
The physical and data layers are combined in this layer and then routed between machines on the same network. The exchange of data (packets) between the network and the machines setup on it is also managed by this layer.
II.Internet.
The Internet protocol uses the IP address of the system to determine the address of the device it is communicating with. (The IP address helps because it consists of two parts - Network Identifier and Host Identifier). The internet layer corresponds directly to the network layer.
III.Transport.
The transfer control protocol (TCP) asks the other devices on the network if it is ready to accept information from the machine where the protocol originated from. In other words, if there is a Node-A & Node-B on a network, then the TCP of Node-A will ask Node-B if it will accept information coming out of Node-A (here Node-A becomes the local device).
IV.Application.
This is the layer where all our applications are present. Protocols for applications like SMTP (Simple Mail Transfer Protocol) - the email function, file transfer (FTP - File Transfer Protocol), Telnet, Pop3, IRC and many more are all present in this layer.
This is how your computer connects to the internet and then allows you to use the different functions. So the next time someone asks you how the computer connects to the internet, you know it.