Layer 2 of cardano

Layer 2 contains smartcontract and can be expanded. So I understand it is like the lightning network of the BTC or the raiden network of ethreum. I understand that layer 2 is the outer layer. obviously, but they can talk to each other. and when upgraded, they do not affect each other. but what I don’t understand is that layer 2 of the ada is different and same from the lightning and raiden network where it is. Please explain it for me