A normal centralized server-based model consist of a multiple nodes which communicates with the server. The function of a server is to send requested data to the client and the function of the client is to receive that data. But in peer to peer network there are no fixed servers.
In peer to peer(P2P), each computer in the network can act as a client or server for all the other computers in the same network using the same compatible program to connect to each other. The P2P network can be used for sharing data such as audio, video or anything in a digital file format
In P2P the work is distributed among the peers. These peers are equally privileged participants in application. In this network each computer shares it resources with the other nodes in the network.
Example: Torrents uses a peer to peer sharing, there are no centralized servers. A computer or node downloads the data through the resources of other nodes and then shares the downloaded data with other nodes, here it acts both as a client as well as a server and all the nodes in the network use the same program to connect with each other for sharing data.