On-chain & off-chain

I have some experience in solidity & web3.js, but a little.
So I am not clear on-chain & off-chain terms.
Please let me know about that with comparing solidity & web3.js.
Thanks.