If you are speaking to a friend, someone much younger, or someone you know well, you can generally use “tu” and its verb forms. On the other hand, if you are speaking to someone older, who you don’t know very well, or when you just want to show more respect, you generally use a form of “você”.
This is where it gets complicated. Despite being the most common form of “you” in Brazil, the word “você” itself isn’t as frequently used in Portugal, as it can be considered a bit too harsh or direct.
It’s not necessarily rude, but many people in Portugal have an aversion to it, so you may want to avoid it when you can, or be extra careful to use it with a friendly tone of voice and polite body language.
It’s very common to imply “você”, while avoiding saying the actual pronoun, “você”. On the more formal side, we have “o senhor” (male) or “a senhora” (female). For example: “A senhora quer café? (Do you want coffee?). Some may not expect this full formal treatment unless they are significantly older than you, hold some kind of superior position (such as a boss), or in a customer service context.
When in doubt about formality, a simple option is to just omit the pronoun entirely: “Quer café?” (Do you want coffee?). This keeps things polite, without being overly formal or direct. Another option is using the person’s first name, if you know it: “O João quer café?” (Do you want coffee? - speaking to João).
What if you’re speaking to multiple people? A long time ago, you would use “vós” in informal settings, and “vocês” in formal settings. Nowadays, “vós” is usually only used in the North, while “vocês” is very common for all contexts. If you really want to emphasise formality, however, you could say “os senhores e as senhoras”, (“ladies and gentlemen”).
This is a complicated topic and it takes time to familiarise yourself with all these unspoken rules. Even natives disagree sometimes! Keep these tips in mind, but don’t worry too much if a “você” slips out here and there. For a deeper discussion on these social nuances (plus a printable “Tu vs. Você” flowchart), visit practiceportuguese.com/learning-notes/formal-informal-treatment