Do they work in another phone?
Do other headphones work in your phone?
That's how a shop troubleshoots a problem like that.
If the first case, and not the second, the headphone jack in you rphone probably has to be replaced (by a repair shop, this isn't a do it yourself project).
If not the first case, but the second case, your headphones are shot and you need a new pair.