I have a question regarding Tor that has got me a bit confused lately. Could someone please tell me is Tor a P2P network? Thank you.
No, Tor is not inherently a peer-to-peer network. Tor is network of virtual tunnels an is therefore more like a virtual private network (VPN), but differs from the usual VPN in that the the tunnels proceed from your machine to another (the Entry Guard) and then to a second machine and from there to a third machine (the exit node) and finally, to the point to which you are really trying to connect (e.g., a typical website).
Although Tor is described as an "onion router" I think that it is easiest to imagine it as a series of hosepipes that have been threaded through one another.
To continue this analogy, imagine that you connect a very fat hosepipe from your machine to the Entry Guard. Because the hosepipe is opaque (encrypted) anyone who looks at it will have no idea what it contains, even though they might recognize the hosepipe as being a "Tor hosepipe". Having connected to the Entry Guard, you thread another opaque (encrypted) hosepipe inside the first, together with instructions to the Entry Guard about what machine they should push the second hosepipe along to when the end of hosepie-2 appears out the end of hose-1. So now we have hose-1 connected to Entry Guard, along with hose-2 inside hose-1 also reaching the Entry Guard, and hose-2 alone continuing from the Entry Guard to the next machine.
Repeating this process, having gotten hose-2 to the middle point, we push (encrypted) hose-3 inside of hose-2 inside of hose-1 ... and of course, hose-3 makes an appearance at the end of hose-2 along with instructions for the middle-guy about what she must do with it ... which is to push hose-3 to the Exit node. Finally through the triple hose-pipe, you send request for a web-page on its way. The Entry Guard doesn't know what the request is because it is hidden inside two more layers of hose (encryption) there is a double-layer hose (remember hose-1 only reached to the Entry Guard) that reaches to the middle guy. Middle guy also can't read the request but the smallest of the hoses connects to the Exit Node where your web-request makes an appearance. So the Exit node can now send your web-request to the appropriate web-site and receive the reply ... which he sends back down the pipe to you the way it came.
I hope the analogy is helpful rather than even more confusing. It might also be worth looking at the Wikipedia link I included because it describes things about "tunneling" generally.
There is something else to add: you appear to be asking a question that confuses two very different concepts, a bit like asking "Does it use HTTP or TCP/IP?" or "Does it use wire or is it digital?" when in fact some things with wire are analogue and some are digital, and some things that are digital use wire connections and some use wireless. The questions are ill-formed because they presume that the things that are being compared are of equal status or fulfill similar functions when in fact they do not. Consider this: it is possible ... don't do this, but it is possible ... to run BitTorrent over Tor. BitTorrent is a protocol for peer-to-peer file sharing, and Tor is a network of virtual tunnels. Clearly one thing (Tor/BitTorrent) does not exclude the other (BitTorrent/Tor).