In a stock sale, the buyer purchases the shares of the company, effectively taking over all its assets and liabilities. In contrast, asset sales allow the seller to transfer only selected assets, offering more flexibility to both parties in structuring the deal.