When I traveling I was listening the music with earphone and then after some time I left the earphone with the phone the symbol of earphone was there on mobile and unable to listen media sound like song video in Mobile phone

But again I entered few part of jack into mobile then sound of media start

I didn't know what's problem create

I just fear to if I again put the jack into phone ,the media sound will be off?

Please suggest best solution if you face.