f(x) = 2 is a function that takes any real number as input and produces the integer 2 as output.

You could read about functions in Wikipedia. I would say that the concept of a function is not really a university-level topic. You probably should read a textbook or ask in the Pre-Algebra and Algebra forum.

Edit: Here is a couple more links to Dr. Math about functions and functions vs. relations.