There is a special category called "Transfer" for loan payments and transfers that will exclude those transactions from Spending and Budgets.
A word on loan payments - All loan payments have two transactions: the negative transaction of money leaving your bank account, and the positive transaction of money paid towards the debt, decreasing what you owe. (Note: This is not the case with credit cards. Keep reading to see more on credit cards.) The negative transaction should be categorized as the expense, so your budget will reflect your spending on that category. The positive transaction should be categorized as a transfer, so it does not void the expense of the loan payment.
For example: The negative transaction of a mortgage payment would be categorized as Home: Mortgage & Rent, and the positive transaction would be categorized as Transfer: Mortgage Payment. You can create custom subcategories for all of your loan payments if you wish.
A loan payment essentially is a transfer. The money leaves your bank account, but you then own that much more of the asset associated with the debt, like a home or car. Credit cards are different, because there is no asset associated with the debt. A credit card payment is repayment for money borrowed, on transactions already accounted for in your budget. If you actively use your credit card, payments on that card should be categorized as Transfer: Credit Card Payment. If you are paying off your credit card, and would like to track your progress in Spending and Budgets, see "How do I budget for paying off debt?"