When I have a state refund but I owe taxes on my federal return, is my state refund automatically credited to my owed taxes on my federal return?

I owe taxes on my federal return but am getting a refund on my state return. Does my state refund get applied to my owed Federal taxes?