Personal pronouns
stand for the person(s) speaking, e.g.
Ich lerne Deutsch. (I am learning German.)
Wir lernen Deutsch. (We are learning German.)
stand for the person(s) addressed, e.g.
Du lernst Deutsch. (You are learning German.) [Your are talking to one person the informal way.]
Ihr lernt Deutsch. (You are learning German.) [Your are talking to more than one person the informal way.]
Lernen Sie Deutsch, Frau Smith? (Are you learning German, Ms Smith?) [Your are talking to one person the formal way.]
Lernen Sie Deutsch, Herr und Frau Smith? (Are you learning German, Mr and Ms Smith?) [Your are talking to more than one person the formal way.]
or stand in place of nouns or noun phrases, e.g.
Mein alter Freund wohnt in München. (My old friend lives in Munich.) -> Er wohnt in München. (He lives in Munich.)
Der Kühlschrank ist energieeffizient. (The fridge is energy efficient.) -> Er ist energieeffizient. (It is energy efficient.)
Die rote Jacke kostet viel Geld. (The red jacket costs a lot of money.) -> Sie kostet viel Geld. (It costs a lot of money.)
Die Studenten gehen in die Bibliothek. (The students are going into the library.) -> Sie gehen in die Bibliothek. (They are going into the library.)
Note I: "er" and "sie" usually refer to persons.
Mein Bruder lernt Deutsch. (My brother is learning German.) -> Er lernt Deutsch. (He is learning German.)
Meine kleine Schwester spielte gerne Schach. (My little sister likes playing chess.) -> Sie spielt gerne Schach. (She likes playing chess.)
However, they can also substitute masculine or feminine nouns or noun phrases that don't refer to people, e.g.
Schokolade (f): Schokolade hat viele Kalorien. (Chocolate has a lot of calories.) -> Sie hat viele Kalorien. (It has a lot of calories.)
Rucksack (m): Der alte Rucksack ist schwer. (The old rucksack is heavy.) -> Er ist schwer. (It is heavy.)
Note II: The formal "you" ("Sie", no matter whether you talk to one person or to more than one person) is used when addressing
strangers or
people with whom you are not on a first-name basis or
people whom you would like to show some respect or
people to whom you wish to maintain a certain distance.
2nd person singular, informal
2nd person singular, formal
Sie
she
it
sie
es
2nd person plural, informal
2nd person plural, formal