Why loans/debt can cause inflation? I learned that inflation can be a result of more loans or debt. When there are too much borrowers in the country, people will have more money to spend and the amount of products is the same so prices will increase. 

This does not make sense to me because for each new borrower, there is a new lender. Number of borrowers equals the number of lenders. So, when someone has more money to spend, the lender has less to spend. What can cause inflation?
Imagine an economy with only one good, tomatoes, and three people, Lender, Borrower, and Owner. Owner owns all tomatoes. Lender owns all the money. And Borrower owns nothing. If Lender doesn't lend any money to Borrower and Lender doesn't purchase any tomatoes, the price of tomatoes is 0 as there is no demand. When Lender loans Borrower some money and Borrower uses that to purchase tomatoes, the price of tomatoes will rise - inflation.

So how is this situation different than if Lender just bought the tomatoes themselves instead of loaning money to Borrower? First, the Lender is often not in the same position as the Borrower: money owned by the Lender is less likely to be immediately spent than if the Borrower held it and thus the velocity of that money will differ - after all, the Borrower is probably borrowing for a reason. Second, often times because of fractional reserve banking, the amount loaned to Borrower is more than what Lender has in reserve: in other words, more credit is created and if there is more credit chasing a fixed number of goods, price increases will follow.