A function, in programming and mathematics, is fundamentally an entity that receives input values and produces output values based on a defined relationship or transformation. This definition applies across programming paradigms - functions map inputs to outputs. Options B, C, and D describe variables, strings, and hardware respectively, which are not functions.