Excellent question! In Act 1, Bassanio seems to have little difficulty selling Antonio on the idea of loaning him money. Bassanio admits to his spendthrift ways, promises to correct them, but convinces Antonio that he will not be able to win the woman he loves (Portia) without a show of wealth. After Antonio loans Bassanio the money, Bassanio even wastes some of it on a lavish party before departing for Belmont.
In Act 3, when news arrives in Belmont of Antonio's dire situation (his ships have all been lost, and Shylock is insisting on a pound of Antonio's flesh), Bassanio is devastated and guilt-stricken and immediately decides to go back to Venice to try to save his friend.
In answer to your last question, Bassanio owes Antonio for loans that the merchant made to him before the play begins (Bassanio references this truth in Act 1), owes him for borrowing money from Shylock on his behalf, and indirectly owes him for his wife because without Antonio's financial help, Bassanio would not have been able to travel to Belmont to try his hand at the casket riddles.