Let me put it in simple terms.
I come to your country and see potential and invest in a road project and after completing the road I collect toll and try to recover my investment and try to make profit and if I can't collect enough toll in the given time I make loss and move out,that's fdi .I am responsible for my investment.
Now the second case with the same project but I get assurance from the govt that I will get certain % as assured returns what ever the outcome of the collected tolls that's loan.loan has assured returns committed by the govt.