It can also be used as a term of endearment, like "dude" or "bro" in English, though this usage is more common in Latin America.
It's important to consider the context when you encounter "tio". If you're unsure of the meaning, asking for clarification is always a good idea.