A hug is a hug. It is a way of connecting with another human being. If you don't like hugs from behind that is your right to say no whether it is a girl or guy.
What does it mean when a girl hugs you from behind? I've tried looking it up but I only found the meaning if guys did that, would it be different of the same if it was a girl?
It's pretty much the same for either gender EXCEPT when a man walks up behind a girl, says, "Guess who" but doesn't put his hands over her eyes. >;-/
There's no one meaning for gestures of any kind. Maybe the person was surprising someone .. Or shy to hug from the front .. Or just did it on the spur of the moment. You have to get to know someone well before you know why they do things .. And even then you're just guessing.