I have a 1099-G form for my 2017 state tax return. Am I being taxed on a tax refund? Is that legal?

I do not understand how I can be expected to pay taxes on a tax refund from last year. Can anyone explain this to me?