The Peer to Peer protocol (using version
, verack
, getdata
, ... etc. messages) is used by all clients communicating on the network. This protocol is how data is spread through the network. This is done directly over TCP/IP. Messages have their own format (not JSON) and allow the spread of transactions and blocks through the network. Read more at: https://bitcoin.org/en/developer-reference#protocol-versions.
After a Bitcoin Core full node has received the block and transaction data via this P2P protocol, then a user can use the RPC interface to query the node about the data it has received. The JSON-RPC interface used is specific to Bitcoin Core, although other clients may introduce similar interfaces for ease of use. Nodes do not typically communicate with each other using the RPC interface at all, the RPC calls are more like tools that Bitcoin Core provides for developers to give them access to the blockchain data.