A debt consolidation loan is simply a personal loan, so you're technically free to do whatever you want with the cash once received from the lender.
However as borrowing should only be for an amount you NEED over the shortest period possible, you should only use it to repay the existing debts you have.
As we warn above, a debt consolidation loan may not always help on the path to becoming debt-free, but if you're sure it's right for you then it's typically used to pay off existing loans (including payday), overdrafts and credit cards.