A real valued is a function, whose range is $\mathbb{R}$ or some subset of $\mathbb{R}$.
$\frac{1}{x}$ for $x\in\mathbb{R}$ is real valued. We note that its range is $(-\infty,0)\cup (0,\infty)$, which is a subset of $\mathbb{R}$.
Polynomials are real valued, but they are not the only functions who are real valued.
A few examples of real valued functions:
The following are said to be real valued functions since their range is the set of real numbers, or some subset of the real numbers.
$f(x)=2$ ; The range is $\{2\}\subset \mathbb{R}$
$f(x)=11x$ ; The range is $\mathbb{R}$
$f(x)=e^x$ ; The range is $(0,\infty)\subset\mathbb{R}$
$f(x)=\dfrac{1}{x^2}$ ; The range is $(0,\infty)\subset \mathbb{R}$
etc...