There is no single definition. Each context, each technology can define it in a different way. So the dictionary definition can help more than a specific definition. It can be seen in Priberam or Michaelis, then it would be something measured in a small and harmonious way?
There are modules that do not have these names. And there are things called modules that may not go through a rigorous inspection of the term.
Note that there is not even a definition of the size of this module. It can have a very specific responsibility or have a much more general responsibility. Although it is certain that it does not correspond to the whole, it is a part of the whole.
Anyway, there is not a good canonical definition of what this is. You have to analyze the context to better define what is being said.
Modular programming
There is the modular programming (see more) which proposes to create applications divided into small parts. What are these parts is not well defined. A module in this context can be a method, can be a class, can be a source file, can be an executable, can be a package, whatever this means in each situation, can be some other grouping of other smaller parts yet.
Static classes
In fact it has a language that calls a module a class that only has static members.
Grouping of types and other constructions
It has language that groups several types (represented by classes, for example) within it. In some this resembles a namepace, others to a compilation unit, usually even mixing the two concepts.
PHP
In PHP the term is used for things other than programming itself.
Off-schedule
I didn’t even come close to talking about the modules used in something in the developer’s professional cycle but it’s not related to the programming itself.
Mathematics
So little spoke of the module which is the operation of obtaining the rest of an entire division. I think that is not the purpose of the question.
I don’t think this applies to a specific language, my suggestion is to exchange the current tags for software engineering and terminology, clearly if it doesn’t change the meaning of the question.
– rray