usually when you enter a contract, you have 2 contigencies stated in the
contract, inspection and mortgage commitment. If the inspection result is
not acceptable and the seller is not willing to repair, or you cannot get
mortgage for the house, you can back out from the contract and get your
downpayment back without penalty.
Title search is expensive (call a local attorney to get an idea of how much
it cost you and usually it is paid by the buyer). Title search should be
done after inspection contigency is removed as you know you want the house.
Otherwise it is a waste of money.
Also, look around to find an attorney and get some education about the
procedure. Attorney will tell you the normal procedures after the offer is
accepted and the first consulation should be free. Attorney really works
for you while real estate agent does not. Agent just want you to buy the
house and get paid the commission.