1.    Make sure that the headphone plug is properly connected to the piano/keyboard. The position of the headphone jack of piano/keyboard is shown below.

2.    Connect a different pair of headphones to the piano and check.

3.    Check if there are any foreign objects in the headphone jack. 

4.    If it doesn't work after all the test, need to replace the accessories.