it's suppose to mean family before anything else; however many people say the phrase and don't really mean it since they would pick their friends over their sister/brother or cousins.
person 1: hey cuz wanna go to the movies?
person 2: um........ u gon on without me i wanna chill with my friends
person 1: hey cuz i really don't like one of your freinds, she was being a bitch
person 2: omg how could u say that about my friend, she is such a goood person, u probaly pissed her off or something.
The ties that bind are stronger when it comes to family than people outside the family (e.g., friends, colleagues, strangers, etc.).
Blood = family (though not necessarily related by blood, such as husband and wife)
Water = non-family
1) "Don't trust anyone outside the family. Blood is thicker than water. Never forget that."
2) A man wakes up from a coma to find all of his family around him. Man: "Where are all my friends? They said they would be there for me no matter what!"
Nurse: "I suppose it's true what they say: blood is thicker than water."
3) "Why did this man's friends show up to his funeral, yet none of his family did?"
"Well... I guess water is thicker than blood!" (the opposite can also be used for dramatic effect)