What is the difference between a coinswap and a submarine swap?
Bitcoin Optech defines a coinswap as:
Coinswap is a protocol that allows two or more users to create a set of transactions that look like independent payments but which actually swap their coins with each other, optionally making a payment in the process.
The most recent example of a coinswap implementation is Chris Belcher's Teleport. The important detail is it is swapping coins or UTXOs on the same blockchain to gain a privacy benefit.
Lightning Labs defines a submarine swap as:
A submarine swap is a trade between on-chain and off-chain digital assets (i.e.between Bitcoin held on-chain and Bitcoin on the Lightning network).
(I believe Alex Bosworth of Lightning Labs coined the term.)
Of course terminology is always a bit uncertain in emerging fields as formal definitions haven't been universally agreed upon. There is a wide overlap in terms of the actual technology (adaptor signatures, timelocks etc) used to trustlessly swap coins on the same blockchain, to swap between onchain and Lightning and to swap between different blockchains (generally referred to as an atomic swap).