Web3 libraries provide access to helper methods that allow you to interact with the blockchain via a Web3 provider such as Infura (or your own node).
The Web3 libraries enable you to build frontends that can communicate with the blockchain (including smart contracts deployed on the blockchain).
Web3 libraries are available for various blockchains, for example, Matic.js for the Polygon network. This topic focuses on the Ethereum network, but the fundamentals are the same for other blockchains.
The following image shows how a Web3 library can connect to your node (in this example Infura) to communicate with the blockchain.
Web3 library connecting to Ethereum
Some popular Ethereum compatible Web3 libraries include (but are not limited to) the following.
Refer to the Ethereum instructions for information on how to access the blockchain using some of these libraries.