Every state processes tax refunds differently, you will need to check your state. Here is a FAQ with the links.
https://ttlc.intuit.com/questions/1899433-how-do-i-track-my-state-refund
Generally, a state refund will not be offset for a federal debt like a student loan, but a state refund could be offset for a state debt, such as tuition at a state college, or a student loan that was guaranteed by the state instead of the federal government.