This sounds like the pcb board mounting inside the speaker jack has come loose because the headphones may have been ripped out at an odd angle, or too much force was used on them. The board that supplies audio to your headphones via the headphone jack has come loose and may be shorting/not connected. The best way to find out would be to open the laptop for yourself and check. If you still have a warranty, send it back, otherwise this might be a bit tricky.
If you need to open the laptop there will be up to a few dozen screws in the base, underneath the battery case, and under some stickers. You will also have to remove any hard drives to access other screws, there are also screws under your keyboard, however every keyboard has a different opening mechanism.
I would suggest that if you do not have a warranty and are not technically skilled, print out this page and take it to your local repair shop. Most of the time they will not charge a lot (about $50) to repair something like this. If the board is disconnected however and the wires affected are micro-circuits, then a replacement will be required. Still your local technician may be able to help you fix it without replacing.
Good luck:
Patrick Busby
Certificate III: General Information Technology
2nd year Electrical Engineering student
Local repair business; fixing PC's for 8 years