A biological function is the reason some object or process occurred in a system that evolved through a process of selection or natural selection. Thus, function refers forward from the object or process, along some chain of causation, to the goal or success. Compare this to the mechanism of the object or process, which looks backward along some chain of causation, explaining how the feature occurred.
A functional characteristic is known as an adaptation, and the research strategy for investigating whether a character is adaptive is known as adaptationism. Although an assumption that a character is functional may be fruitful as a research method, some characteristics of organisms are non-functional, and may simply be emergent phenomena arising as a side effect of functional systems (see Spandrel (biology)).
From the point of view of natural selection, biological functions exist to contribute to fitness, increasing the chance that an organism will survive to reproduce. For example, the function of chlorophyll in a plant is to capture the energy of sunlight for photosynthesis, which contributes to evolutionary success.
Function is not the same as purpose in the teleological sense. Evolution is a blind process which has no 'goal' for the future. For example, a tree does not grow flowers for any purpose, but does so simply because it has evolved to do so. To say 'a tree grows flowers to attract pollinators' would be incorrect if the 'to' implies purpose. A function describes what something does, not what its 'purpose' is. However, teleological language is often used by biologists as a sort of shorthand way of describing function, even though its applicability is disputed.