Ethereum has limited capacity because of the blockchain trilemma. To have decentralization we need to enable as many people as possible to run a node, which means that the number of transactions that can be processed per minute is limited by the capacity of standard hardware. This limits our ability to scale, unless we accept the security implication of not having every node process every transaction.
Solutions that build on top on Ethereum are called layer 2 or L2 (with Ethereum itself called layer 1 or L1). Optimism uses a type of solution called an optimistic rollup.
Rollups post all transactions on layer 1, so data integrity and availability are provided by Ethereum.
Optimistic Rollups use economic incentives to ensure the data processing, done offchain, is done correctly. The sequencer node posts the merkle root of the blockchain state on L1 (called the state root). Other nodes, called verifiers, can issue fault challenges if they believe the state root is incorrect. In the case of a fault challenge part of the transaction is executed on L1 to verify which is the correct state root.
Sequencers that post correct state roots, and verifiers that challenge incorrect ones, are rewarded for their honesty. Sequencers that post incorrest state roots are penalized for dishonesty. Verifiers that challenge correct results, which could be used as a denial of service attack, are penalized. If a state is not challenged for the challenge period (seven days on the production network), it is assumed to be correct. As long as there is at least one honest verifier, the state will end up being the correct one - and the economic incentives are aligned with honesty.
We have a bridge that allows users to deposit into Optimism and withdraw from it using this mechanism. A withdrawal requires you to wait the duration of the challenge period (until the blockchain state becomes indisputable), but faster withdrawals are available from third party bridges that run their own verifiers so they know the state submitted is correct.
For more details, see the video below or read here.