Yes, I had to do this when one my hips collapsed spectacularly whilst out walking, 4 days before departure.
As others have said, the exact procedure depends on the Ts&Cs of your holiday booking, and your insurance.
Mine were separate, so I cancelled the holiday, and they sent the relevant paperwork. I did have the option of re-booking, but was so uncertain that I cancelled completely.
I contacted the GP (as I needed advice) and an Xray was arranged immediately. The GP sent me a copy of the report and charged an administratve fee.
I then filled in my insurance claim. Ts&Cs vary - in my case I was liable for an excess of ยฃ30 + the GP's fee.
The other money was refunded within the week. The company was Insure & Go - the only time I have claimed and they were excellent & sympathetic.
I hope you find it as straightforward. I also hope you can get treatment and whatever it is clears up.