Definition:
A protocol is a set of rules to communicate over the Internet about something.
Like technology stack, protocols have a hierarchy. The lower ones handles basic data passage, while the higher ones specify communications for specific applications (eg: Email).
The basic protocols of communicating data over the Internet is TCP/IP or UDP. All machines involved in the Internet must follow these protocols to send and receive data.
Built on top of TCP/IP or UDP are protocols that communicate for certain applications. Examples are HTTP for webpages/APIs, SMTP for Emails, and SSH for secured shell.
Analogy:
Not just the Internet, many communication devices must have protocols to communicate:
- Morse code.
- Telephone routing.
- TV signal transmission.
- Bluetooth
- RFID
Examples:
- HTTP (webpages, APIs)
- SSH (remote shell login)
- SMTP (mail)