Usually this does not end well for the buyer.
If you really want to do it I recommend that you have a real estate attorney draw up the agreement. You will have to decide on a price. I suggest you pay for an appraisal. Agree on how much of the monthly rent goes toward the purchase, agree beforehand on interest rate and the time frame, do not accept any kind of prepayment penalty etc. etc.
You would want to hire a home inspector to make sure there are no issues. You also want to know if there are any liens on the property and so on. We are just touching the surface of what can be a very expensive life lesson. Sometimes these things work but only about 1% of such arrangements result in the buyer getting a good deal.
The best policy is to save your money, pay off your debt, get a credit history that will make it easier to get a bank loan, use a real estate buyer's agent to help you find a good property and get a pre-approval from a reputable lender. Stay away from on line loans.
Former real estate agent