The simple answer is both. While it is important to pay down your debt, you'll also want to save for a rainy day. If you lose your job or incur medical bills, you'll want to be able to continue to make your payments and not go further into debt if possible.
If you can, pay off your high-interest loans first. Transfer high-interest debt to low-interest accounts if necessary. Living paycheck to paycheck is dangerous no matter your circumstances. Most personal finance experts advise that you put aside three to six months of your living expenses into an emergency fund. Once you have achieved emergency saving goals, you can concentrate on paying down low-interest debt and contributing to your retirement.