the usual notation is:
f: A \to B
what is meant by this is:
for any element a in the set A, f(a) is defined, and is an element of the set B. B is called the "co-domain" of f, and is not to be confused with the "range" of f (or the image set), which is f(A). f(A) is always a subset of B, it may not be all of B itself.
for example, if we have:
f:\mathbb{R} \to \mathbb{R}, f(x) = x^2
then we are saying f (the "squaring function") is defined for every real number x, and that x2 is also a real number. as it turns out, x2 is always non-negative, so in this case, the range of f is considerably smaller than the co-domain.
in general, you can always make the domain (the set A) smaller (this is called a restriction), and the co-domain bigger. in calculus, it is common to choose the entire real numbers as the co-domain, rather than trying to figure out ahead of time what the actual range is. often, we are only concerned with the behavior of f on a particular kind of subset of R, an interval (usally denoted I, or [a,b] or (a,b) if we wish to specify whether the interval includes the boundary points).
often, A is called "the source (or start) set", and B the "target set" (and the arrow is suggestive of some kind of motion, or action, or transformation).