Rollup is a Layer 2 solution.
Layer 2 solutions are designed to improve the scalability of the blockchain mainnet (often referred to as Layer 1) by executing transactions and smart contracts outside the main chain and efficiency mechanism. They aim to reduce network congestion, lower transaction fees and increase transaction throughput. Examples of Layer 2 solutions include state channels, sidechains, rollups, etc.
To learn more, you can check out "What is Layer 2?"
On the other hand, rollup is a specific type of Layer 2 solution, which bundles or "rolls up" multiple transactions into a single proof, which is then published on the main blockchain (layer 1). By aggregating off-chain transactions and submitting proofs only periodically to the main chain, rollups help reduce the amount of data stored on the layer 1 blockchain and increase its scalability.
There are two main types of Rollups: Optimistic Rollups and ZK-Rollups. Optimistic Rollups rely on users submitting fraud proofs in the event of malicious behavior, while ZK-Rollups use zero-knowledge proofs to ensure transaction validity without requiring the main chain to verify the details of each transaction.
ZK-rollups are superior to Optimistic rollups in terms of theoretical transactions per second (TPS) limit, transaction end time, and security. However, as of April 2023, they are lagging behind in EVM compatibility. This leads Vitalik Buterin to believe that in the short term, Optimistic rollups may be superior in general EVM computing. But in the medium to long term, as technology advances, ZK-rollups will win.