Cohesion is a notion in software construction that represents the strength of the dependencies within a component. Cohesion indicates how well the pieces in a component hang together.
Ideally there is a high cohesion within the component. Responsibilities assigned to a component typically use typically the same data and operate in the same specific set of business or technical activities.
If pieces in a component do not have a strong dependency or relationship, this may be an indication to separate functionality out into a new component.
Cohesion can play on various levels of our software design: on the components level (probably the lowest level), but also on subsystem and system level.
The principle of cohesion goes hand in hand with the principle of loose coupling. On the one hand you want to make sure you separate concerns into components, define neat interfaces, you make there no unnecessary inter-component communication. At the same time you club parts of a component because they all contribute to a single well-defined task.
Cohesion not loose coupling are very recent concepts in software construction. Cohesion was probably first extensively discussed in Page-Jones, Meiler. The Practical Guide to Structured Systems Design publication in 1988!