The way it's worked in my somewhat limited experience is that the original agreement has some escape clause based on the inspection. Sometimes it's a monetary limit (if the cost of repairs is > $XXXX the buyer can quit) sometimes it's a blanket (buyer can quit for any reason) or the buyer can waive the inspection.
Then you get the inspection done and you demand that the seller do any of the following: fix what you specify, escrow funds which you will use to make the repairs, or reduce the sale price accordingly.
The seller will either tell you to pound sand (in which place you either suck it up and reduce your demands or use the escape clause if it's that bad) or the seller will agree, or the seller will make a counter offer (I'll fix the roof, you're on your own for the furnace) and you go round and round until somebody runs away or you come to an agreement.
In my home purchase, there were a few minor issues, close enough to our $1000 escape limit that we could have bailed, but nothing significant enough to make it worth walking away. The seller (an asshole, actually) would not budge, no matter what we offered (you pay half, you pay 1/3, etc).
So we took it. Come settlement he left the house a complete mess. It was fun telling him to go clean his sh!t up or find a good lawyer.
Just remember that kharma is a bitch and a real estate purchase is a give-and-take process. He wanted to take take take and it came back to bite him at the end.