Gender in German doesn't match that in English. This is particularly the case for the German es which often doesn't correspond to the English "it". In the same way, however, sie is not always "she", nor er always "he". Let's see why!
Difference #1: English objects don't have a gender, German ones do!
the table, it is nice
der Tisch, er ist schön.
the sun, it is warm
die Sonne, sie ist warm.
the museum, it is open
das Museum, es ist offen.
Difference #2: In English, we always use "it" for inanimate objects. Germans don't follow this restriction and they even use es to refer to a child for example.
He/She is tired.
Es ist müde.
The other day I met Kurt, my German neighbor, and he said: "Oh, is this your child? How old is it?". Now I understand why he said that! :D
Haha! I hope no offence was taken.
Difference #3: Animals can be masculine or feminine.
The cat, it is tired
Die Katze, sie ist müde.
The dog, it is tired.
Der Hund, er ist müde.
So to sum up, it all comes down to the gender of the noun. Is that right?
This will take a little getting used to, but don't worry about it too much - you'll start doing it automatically at some point!