Does $f:\mathbb{R}\to\mathbb{R}$ mean that $f$ maps to all reals? This is a quick question. When people write $f:I\to J$ for instance, does $J$ need to be the range of $f$ or can it be any set containing the range of $f?$ For example, is $g(x)=\pi$ an $\mathbb{R}\to\mathbb{R}$ function?
Usually, $f:A\to B$ means the domain of $f$ is $A$ and $\forall a\in A$, $f(a)\in B$. The map does not have to be injective or surjective. The range of $f$ is usually denoted as img$(f)$ or the image of $f$, which in this case is a subset of $B$.
condensed from comments received :

$$f:X \to Y \equiv \forall x \in X \quad \exists y \in Y \text{ such that } f(x)=y$$
$$f:X \to Y \land f_\text{ onto/surjective}   \equiv  \forall y \in Y, \, \exists x \in X  \text{ such that } f(x)=y$$
$$f:X \to Y \land f_\text{ 1-1/bijective}   \equiv \forall x \in X \quad !\exists y \in Y \text{ such that } f(x)=y$$