If you sell it to a scrap merchant, you fill in and sign the yellow section of the V5C (sale to a motor trader), get them to sign it, and post it off yourself to DVLA (to make sure it is done). Give the rest of the V5C to the new keeper.
If you sell it to someone who isn't a motor trader, you complete and sign section 6 of the logbook, get the new keeper to sign it, and send to DVLA. Give the green slip to the new keeper and bin the other slips (yellow and purple)
You don't have to notify anyone that the vehicle is no longer roadworthy, and you musn't mark the vehicle as scrapped on the logbook as it won't be you who scraps it.