Layer 2 means secondary chains built on a Layer 1 such as Ethereum to raise throughput. Ethereum Layer 1 processes roughly 15 transactions per second. Layer 2 systems process hundreds or thousands. They take transactions off the base chain, batch them, then post the batch to Layer 1. Security still comes from Layer 1. If there is a dispute about Layer 2 state, you can check it on Layer 1.
Optimistic rollups treat transactions as valid unless someone proves otherwise. They are fast and cheap. A challenger can prove a bad transaction on Layer 1. Zk-rollups use zero-knowledge proofs to show validity without posting every byte of transaction data. Validiums keep data off-chain for privacy and are more centralized. Sidechains are separate chains that sync with mainnet on a schedule.
Examples include Arbitrum, Optimism, Base, Polygon, and Starknet. Tradeoffs differ. Some are more decentralized. Some are faster. Some are cheaper. All of them try to raise throughput while keeping Layer 1 security for settlement. They process transactions quickly and cheaply. Sidechains are independent blockchains that periodically sync with mainnet.
org defines Layer 2 as a separate chain that posts data or proofs back to Ethereum so users pay less while still inheriting Ethereum's security claims.
Layer 2 Scaling Solutions
Interactive visualization of how Layer 2 improves blockchain scalability through batching