Alles means "everything", but "alle" means "every" or "all". When you want to use "alle", you need to be able to count the items: Alle Hunde, alle Pflanzen, alle Freunde.
Sometimes you hear beginners ask about the difference between "alle" & "alles" in German. Telling the difference can be especially tricky when it looks like the two words could be swapped out for one another:
However, alle and alles aren't interchangable. They have different meanings.
The difference between alle & alles
The difference between alle & alles in German is very similar to the difference between "all" and "everything" in English.
Whenever you would use "everything" in English, you'd say "alles" in German.
So the first example sentence means, that he has heard everything. Whereas the second example sentence means that he has heard all (of them) or everyone.