Off-chain vs. On-chain

Hi everyone,
I’m new and I was wondering on whether the business logic was kept on-chain or off-chain (or even an hybrid between the two).
I heard about this distinction just for how data are handled or about the oracle services that allows to onboard off-chain data but I didn’t find a lot about the contracts execution themselves. How’s the computation handled?
Also, I read on the web that the Smart contract lifecycle (which means the full process of creation, execution and finalization) is “stored off-chain” (Ethereum vs Fabric vs Corda: Enterprise Blockchain Protocols Compared)… but I’m a bit confused, what does it mean? Where’s the code in the end?