Cartesi is a layer-2 infrastructure for the blockchain that enables complex and intensive computations to scale. It works by combining Linux and blockchain technology, allowing developers to run off-chain computations while ensuring data availability and verifiability on-chain.