Every device connected to the internet uses sockets to communicate with another device or server. The basic idea is quite simple; a client that usually has some requests connects to a server that is able to handle those kind of requests, and the communication between those two is established using sockets. Nowadays, there are many frameworks out there with which you can easily set up a communication channel, but to understand this scenario as much as we can, we will go through socket programming, and I will explain everything. To sum up, the client requests some data from the server and the server responds with an answer back to the client.
The following is a simple image representing this communication scenario:
Socket programming is actually the two arrows in the preceding image. It shows how the communication is implemented and how a client can identify...