Communication means that people exchange ideas with each other. When one person says something to another, that is communication. It doesn't matter whether what is said is funny or sad. It doesn't even matter if the two are talking to each other at all, just waving at each other or using technical devices. Several people can also be involved at the same time.
The main thing is that they exchange something with each other. Only then are they communicating. You can also say: they communicate. The word comes from the Latin word "communicare". It means: to share something, to communicate, to do something together.