Why was the amount I have to pay in on my federal tax return was deducted from my state tax refund?

Can the amount you owe for federal tax be deducted and paid from your state refund?