On-chain transactions are transactions that get recorded on the blockchain (ie. the distributed ledger storing all transactions of Bitcoin or the cryptocurrency of your choice). The opposite of these are off-chain transactions, which refer to either (a) the internal transactions as handled by exchanges and custodial wallets (ie. you send an on-chain transaction to an exchange, when you sell your coins to another person the exchange creates an internal off-chain transaction which is essentially a simple database entry subtracting the sold coins from your exchange account and crediting it to the account of your counterparty) or (b) decentralized 2nd layer solutions (eg. akin to telecommunication protocol layers) that handle transactions on a higher level protocol layer while using the blockchain and its on-chain transactions for settlement only (eg. akin to how credit cards will debit your bank account at the end of the month, but not for every single transaction). A typical example for (b) being Lightning Network [1].
Sidechains are usually smaller blockchains that rely on more established blockchains for their security via merge mining or similar means (which would in this case be the mainchain). Not all coins that are merge mined are necessarily sidechains though (eg. Namecoin [2] is merged mined with Bitcoin but not a sidechain) and to be honest I'm not sure whether all sidechains are actually merge mined either; but the gist is that a sidechain's security is handled by its corresponding mainchain. Tokens as issued by the sidechain are then usually pegged to the mainchain's native currency in one way or another, with the sidechain usually serving a purpose that goes beyond what the mainchain can provide. An example for such a sidechain would be RSK [3], which intends to provide Ethereum-style smart contracts for Bitcoin by going beyond Bitcoin's native scripting capabilities.
Using sidechains has also been proposed as a possible scaling approach by moving certain types of transactions off the mainchain and onto a sidechain (or federated sidechains) and I'm sure other use cases have been suggested as well; however I haven't looked into sidechains all that deeply.
[1]
https://lightning.network/[2]
https://namecoin.org/[3]
https://www.rsk.co/