Unlike English, Spanish often omits subject pronouns. The verb ending itself usually shows who performs the action.
Yo trabajo en Madrid. — I work in Madrid.
But a more natural version is:
Trabajo en Madrid.
The ending of trabajo already shows that the subject is the first person singular.
A subject pronoun is usually included when the speaker wants to emphasise or contrast the subject.
Yo trabajo, pero él estudia.
I work, but he studies.
A pronoun is also used when it would otherwise be unclear who the subject is.
Ella vive en Valencia.
She lives in Valencia.
The forms tú and usted should be learned separately.
Tú is used in informal communication with friends, relatives, and acquaintances.
Usted is the more polite or formal form. Although it means “you,” it takes a third-person verb form.
¿Cómo está usted?
How are you?
In Spain, vosotros / vosotras is commonly used when speaking informally to more than one person.
¿Dónde vivís vosotros?
Where do you live?
In many Latin American countries, ustedes is used instead of vosotros.
¿Dónde viven ustedes?