You need title insurance to protect yourself in case there is a problem or defect in the title to your real estate prior to your ownership. If there is legal trouble with your real estate title (a workman’s lien on the property for example), then title insurance will cover your losses, usually legal fees. If you are borrowing money to buy the real estate, then the lender will require title insurance.
Title insurance has a one-time (per owner) premium usually paid at the closing. It is usually paid by the seller as a sort of guarantee that he actually has clear title to the property he is selling, but this can be negotiated and customs in your location may vary. If you are paying for the real estate with cash (no loan) then you are not required to have title insurance. You can just take your chances.