Prior stood down from the England team after the second test match against India at Lord's last month in an attempt to regain fitness and form.
"It was pretty bad, to be honest," Prior said. "It was a massive decision, but I went as long as I could. It still hurts. I've seen the specialist and surgeons and I'm having an operation on September 4. It's not the end, but there is a long road back and it starts from September 4 with four months of rehab to get as fit as I possibly can. It's been shown by specialists that I couldn't physically have gone on any longer. So it's now time to get it right, get fit again and come back stronger."
The wicketkeeper-batsman, who has averaged 40.18 runs in 79 test matches since his debut against West Indies in 2007, was replaced behind the stumps by Jos Buttler.
The 23-year-old Buttler has thrived, scoring half-centuries in each of his two test innings.
"I think he's done brilliantly," Prior added. "The one thing he has done that is massive for keepers is scoring runs. When you're scoring runs it takes pressure off your wicketkeeping. Jos has done brilliantly and good luck to him."