Optimistic rollups
Optimistic rollups such as Arbitrum, Optimism and Base assume transactions are valid and give anyone a window, usually seven days, to prove fraud. That is why direct withdrawals to Ethereum take about a week.
Zero knowledge rollups
ZK rollups such as zkSync, Starknet and Linea post a cryptographic proof that every transaction was valid. Withdrawals can be faster, but generating proofs is computationally heavy.