When someone says they feel sorry for you it means that the person feels bad about your situation and what you're going through.
The person who feels sorry for you wishes and hopes for a better situation for you and wishes you didn't have to suffer from something they believe you're suffering from.
It's just the person being empathetic and hoping for the best for you when they say they're feeling sorry for you.