Shylock actually lends Bassanio the money, but it is Antonio who backs the loan. Therefore, Antonio is on the hook if the money cannot be paid back. Shylock loans three thousand ducats, to be repaid in three months' time. His conditions are quite odd. Instead of charging interest as he normally would, Shylock inserts the clause that Antonio will owe him a pound of his flesh if the loan is not repaid:
If you repay me not on such a day,
In such a place, such sum or sums as are
Express'd in the condition, let the forfeit
Be nominated for an equal pound
Of your fair flesh, to be cut off and taken
In what part of your body pleaseth me.
Though he pretends this is just a friendly loan and adds this provision as if it were just a joke, it shows how much Shylock actually despises Antonio. Because Antonio frequently lends money out without interest, undercutting Shylock's business, the moneylender holds a grudge against the young businessman. Furthermore, Shylock knows that Antonio frequently insults him and talks ill of him in public. He, therefore, is further motivated to exact some sort of creative revenge against Antonio. Bassanio urges Antonio not to agree to such terms. However, Antonio, as confident as ever, says that his ships will soon return with their earnings and that he will have no problem at all in repaying the loan.