A margin account has the ability to borrow against marginable securities, creating a loan that can be used for various purposes. You can borrow funds to open new positions or request a cash withdrawal as long as the account retains enough funds to continue to meet your current margin requirements. When you later deposit funds back into your account, that deposit will reduce a negative cash balance in that currency and effectively be repaying a cash loan.
Please note, borrowing on margin and holding a position with a value larger than your own funds increases risk to the account as detailed in the IBKR Margin Trading Disclosure.