Welcome To HealthcareMagic forum,
preeti I hope there was never a trauma to the nail before.Usually in fungal infection
does cause yellowish discoloration of nail and it may also come out on its own.
To confirm this you can get a KOH of nail clipping done at any pathology lab.Accordingly you can take any oral anti fungal tablets like terbinafin,itraconazole
etc. There is a nail lacquer also available which you can apply once a week .Best thing would be to consult a dermatologist
as fungal infection is a chronic problem.