In this article we will see the differences between Layer 0, Layer 1, Layer 2 and Sidechain. These are very important distinctions because blockchain infrastructures are only apparently the same. I'll also mention what makes Polygon (and Skale) different from the "real" Layer 2.
Layer 0 is the basic structure that is often incorporated into Layer 1 itself. Layer 0 are "builders" of Layer 1. If you are wondering what Layer 1 are, well they are all those independent blockchains with their own consensus mechanism (Bitcoin, Ethereum, Solana, Terra, Fantom, Cronos Chain, etc). As the name suggests, so-called "Layer 2" platforms require a "Layer 1" to record their actions and provide the foundation for their smooth operation, they perform functions to improve the scalability of the Layer 1 they cling to.
I would like to point out that there are also hybrid systems such as Avalanche and Cardano (a mix between Layer 0 and Layer 1) and Polygon and Skale (a mix between Layer 1 and Layer 2).

LAYER 0
Layer 0 are created with the aim of creating an entire ecosystem on them, an example are the sidechains of Cosmos (Osmosis, Juno Network, Secret Network, Comdex, Persistence, Desmos Network, Stargaze, Regen, etc) which are all independent chains (for the moment with their validators) but connected to Cosmos through IBC (Inter Blockchain Communication). Basically, if a dApp can work on a blockchain of the Cosmos ecosystem it can also interact with all the others. This interoperability is possible thanks to the most incredible aspect of Cosmos: its consensus method. Cosmos uses "Tendermint BFT" (Byzantine Fault Tolerance) as the consensus method. This consensus allows "Tendermint IBC" to connect the Layer 1 built on it. This method not only allows multiple blockchains to obtain PoS consensus in sync with each other, but also means that developers do not need to code their blockchains from scratch as a basic infrastructure already exists (Cosmos SDK: Software Developer Kit) .
Another Layer 0 is Polkadot and its parachains are Acala, Moonbeam, Astar Network, Phala, Bifrost, etc which are always independent chains but made "safe" by Polkadot validators. In this case, Polkadot's Relay Chain is Layer 0, while its parachains are Layer 1 (they are secured by Dot's staking).
Avalanche (AVAX) can be considered a hybrid system between Layer 0 (its mainnet) and Layer 1 (EVM configurable with Metamask). Avalanche has three chains: its mainnet, the one for dApps (EVM) and finally the one for staking.
Cardano (ADA) can also be considered a hybrid system, as it has added the ability to create interoperable sidechains.

LAYER 1
On Layer 1 the dApps, smart contracts, transactions, governance (consensus algorithm), etc run, so part of the Layer 0 functionalities (that of security for example) are directly integrated. Obviously in this case we are talking about all the old blockchains (Bitcoin, Ethereum, Monero, Litecoin, Dash, Bitcoin Cash, BSV, etc) and new generation (Terra, Binance Smart Chain, Fantom, Solana, Osmosis, Juno Network, Astar Network, Acala, etc). They include both Proof Of Work and Proof Of Stake mechanisms.

LAYER 2
These infrastructures were created to improve the efficiency of Layer 1, in particular scalability (lower fees, increasing speed). They rely on Layer 1, inheriting their security and consent. Arbitrum, Optimism and ZK Rollups are secured by Ethereum itself (by its staking). Smart contracts and all onerous fee-level operations are performed on Layer 2. Smart contracts are brought to Layer 2 via bridge, this increases the scalability of Ethereum but at the same time maintains the security of Layer 1 (Ethereum). A case of Layer 2 off chain is Lightning Network which improves the scalability of Bitcoin, trying to implement a fast and cheap payment system. LN is a Layer 2 off chain (you remember: the satoshi move from the Bitcoin blockchain to LN but the total of BTC always remains the same!).

SIDECHAIN (MIXED BETWEEN LAYER 1 AND LAYER 2)
The most famous example is that of Polygon which is often referred to as Layer 2 or Sidechain. The "real" Layer 2 do not have a token and their security is given by the staking that takes place on Layer 1. Polygon maintains links with Ethereum (for this reason it can be considered a Layer 2) but at the same time has its own consensus mechanism then of staking with your own token (Matic). Another example of sidechain, defined as elastic, is that of Skale which uses the same mechanism as Polygon but in addition offers an additional functionality called "Skale Manager" located on the Ethereum mainnet. One of the problems of this solution are the few validator nodes that are easily attackable, if not using a mechanism for mixing them using Skale Manager. Skale is used to improve scalability and to perform a lot of super fast transactions but from small amounts.

Are you interested in ways to earn crypto bonus? Check it out here: Some Sites To Earn Crypto Bonus (Old & New)