Es ist/sind vs. es gibt
“Es ist/sind” and “es gibt” are similar, insofar as they both can mean “there is/are.” However, “es ist/sind” is used for specific occurrences or instances, whereas “es gibt” is used when discussing things in general terms.
Es sind viele Studenten auf dieser Party. / There are a lot of students at this party.
Es gibt viele Studenten an der Uni. / There are a lot of students at the university.
The party is a specific event that has a limited duration, but speaking of the number of students at a university is a general comment that has no apparent time constraint. Also note that the verb “sein” agrees with the subject and not the “es,” which is why it is “Es sind viele Studenten…” versus “Es ist niemand da” (there is no one there).
“Es gibt” is also used when talking about the existence (or lack) of things in general.
Es gibt eine Bäckerei in dieser Nachbarschaft. / There is a bakery in this neighborhood.
Es gibt keine professionelle Fußballmannschaft in diesem Dorf. / There is no professional soccer team in this town.
Impersonal use of “es”
“Es” can be used as an impersonal pronoun (i.e. placeholder) in conjunction with verb in order to express that an action is occurring and not specifying an agent.
Es klingelt. / The doorbell is ringing. OR Someone is ringing the doorbell.
Es regnet. / It is raining.
Anticipatory use of “es”
Sometimes “es” is used in a sentence in order to anticipate something that will be mentioned in the next part or clause of the sentence. It is typically followed by a dependent or infinitival clause.
Ich mag es, wenn die Sonne scheint. / I like it when the sun shines.
Wir lieben es, mit unseren Kollegen zu arbeiten. / We love working with our colleagues.