How to fix a MacBook's sound output which is stuck on headphones?
Try getting some compressed air at Wal-Mart or Best Buy or another retailer and blow the headphone jack clean with that. A can will cost about $5 and you'll need to be 18 or older to buy it.

If it still doesn't work after that, the headphone jack will likely need to be replaced. Unless you do electronics repair, find a professional to replace it for you.