Definition
P2P (peer-to-peer) is a way of communicating in which the computers of individual users on a network swap files and other data directly with each other, without going through a central server. Every computer taking part is called a 'peer,' meaning an equal partner.
Waiting in line for the teacher vs. passing tests around among friends
Picture a teacher handing out exams one by one to 50 students. The line gets long. Traditional internet services work just like that. One huge central server sends data to a crowd of users, so when too many people show up, the server freezes or slows to a crawl.
P2P works differently. The first student to get an exam hands a copy to the classmate next to them, and that classmate passes one on to the next desk. Without any central manager, the participants send data directly to one another.
In this setup, each connected computer is both customer and clerk. It acts as a 'downloader' that receives data and, at the same time, as an 'uploader' that hands its own data to others.
It doesn't slow down just because more people join
On a typical website, the more visitors pile on, the more strain the server is under, and the slower it gets. A P2P network is different. The more peers there are sharing pieces, the more total supply the network has, so speeds don't drop easily even when lots of people show up. There are limits, though. If many people only download and never share, the effect shrinks. And your download speed can never go beyond what your own internet connection allows.
Let's say you're downloading a thick 100-page book. A P2P program slices it into 100 tiny pieces, one page each. Then it uses a method where you grab different pieces from different peers at the same time: page 1 from one friend, page 2 from another, page 50 from someone else.
Even while you're still collecting pieces, any piece you've already received and verified is ready to be shared with others. Everyone downloads and shares at once, so as more peers share pieces, the whole network's supply grows too.
A more precise picture
Not every P2P system cuts out central servers completely. Many use 'hybrid P2P,' where a guide server works like an address book. It only keeps a list of who has which file pieces, while the actual file transfers happen directly between users.
P2P is also not just a shady tool for illegal downloads. It's used to roll out update patches for huge online games to millions of players quickly. It also helps video calls send video between users without detouring through a server, which cuts delay.
Bitcoin and blockchain technology run on P2P networks too, with participants verifying and sharing a transaction ledger together and no central manager. In that sense, P2P is a core root of distributed technology, helping make the internet more flexible and sturdy.
Common misconceptions
P2P is a technology made only for illegal downloads.
P2P is simply a networking technology for exchanging data efficiently. It plays a key role in legal and important systems, such as big game patch delivery, video calls (WebRTC), and blockchains.
Where you meet it
With the BitTorrent program, you pull pieces of a large file from many users at the same time.
A big online game company can use it to push a new patch out to millions of players quickly, taking pressure off its servers.
A cryptocurrency network like Bitcoin has participants' computers verify and share the transaction ledger with no central bank.
In one sentence
P2P is a distributed communication technology in which the computers of network participants exchange data directly, with no central server.