There is no fixed time period to repay loans. As long as the position is safe, borrowing is for an undefined period. However, the fees owed on the loan will continue to accrue over time, decreasing the Health Factor (barring subsequent user intervention). This potentially could result in liquidation.
Loans must be paid back with the same asset that was borrowed. For example, if 1 Ethereum is borrowed, 1 ETH must be repaid with fees accrued in order to repay the loan.
To repay a loan, visit the Dashboard. Under the second column (Borrows), click "Repay" on the desired asset.
This will open up a Repay section for that particular asset, in which you can view your borrowed amount, wallet balance, and Health Factor. Select the amount of the loan you wish to repay, and click "Continue" to confirm the transaction.