Cognition refers to the mental processes involved in gaining knowledge and comprehension, including thinking, knowing, remembering, judging, and problem-solving. These are higher-level functions of the brain and encompass language, imagination, perception, and planning.