Optimistic Rollups are a blockchain scaling solution, particularly Ethereum, where transactions are processed outside of Layer 1 and later posted in batches onto Layer 1.
This solution does computations and executes the code on the Optimistic Rollup chain. Later Optimistic Rollups batch the resulting data and post it to the underlying blockchain. This scaling solution offers lower costs and faster transactions because of batching.
Since the execution of the smart contracts is the same as the underlying blockchain and that blockchain stores the data, rollups offer the same security as a Layer 1 blockchain, such as Ethereum. When Optimistic Rollups post the data, they assume the data is correct. Hence the name, optimistic.
Of course, a natural question arises, how do we make sure that the result of the execution is correct and the data indeed is valid? Optimistic Rollups utilize contracts on Layer 1 that process the posted data and verify its correctness with so-called Fraud proofs.
‘Watchers’ — third-parties similar to validators, watch the posted data. If it is not valid, meaning the data does not match the outcome of running the computation on Layer 1, the system enters into a resolution state, comparing the computation results on Layer 1 and Layer 2. Parties submitting invalid data are penalized with a loss of funds. As a result, out of N participants submitting results, we need only one good actor to start resolution processes to keep the network secure.
I hope this short intro gives you an idea of the inner workings of Optimistic Rollups. If you would like to learn more, I recommend reading this great article by Paradigm Research.