A function is a mathematical concept that describes a specific relationship between two sets of values. It takes an input (independent variable) and produces an output (dependent variable) based on a set of rules or operations. Functions are used to model real-world phenomena, make predictions, and solve problems in various fields such as science, engineering, and economics.