When you decide to buy you should have inspections at your expense that can reveal problems. If negotiations can not resolve differences you may have to bear those costs as the deal falls apart.
Below is an excellent primer about buying real estate that will address most questions that pop up. Take time to interview agents, they are NOT interchangeable.
Let me know if I can answer further questions.
Very best, Phillipa