Er is one of the most versatile words in Dutch. Its five uses are: existential er as the dummy subject in there-sentences such as Er zijn veel studenten; locative er replacing a mentioned place as in Ik ben er geweest; prepositional er combined with a preposition to replace a thing as in Ik denk er vaak aan; quantitative er with numbers as in Ik heb er drie; and passive er as a dummy subject as in Er wordt hier veel gelachen.
The existential use with er zijn or er is is the first one learners encounter and the easiest to grasp because English uses the same construction with there: Er is een probleem means There is a problem. The locative use replaces a place noun already mentioned. Prepositional er combines with prepositions to refer to things rather than people: Ik hou van koffie becomes Ik hou ervan.
The quantitative use trips up many learners: when you refer back to a quantity without repeating the noun, Dutch uses er. Hoeveel boeken heb je? Ik heb er tien. English would just say I have ten, dropping the pronoun entirely. Passive er acts as a placeholder subject when there is no real subject: Er wordt hard gewerkt means Hard work is being done. With all five uses identified, learners can start spotting which type they are dealing with in real texts.