In the event of a stock merger (or: stock swap) a legal person transfers the shares to another limited and in exchange receives shares of this limited back. Effectively it is a share-for-share merger.
A stock merger is often used to create a holding structure to enjoy tax advantages.