Can every continuous function be extended from a locally compact Hausdorff space to the one-point compactification? In my book it is discussed continous functions on a locally compact space in $\mathbb{R}^d$. And they talk about functions that vanish at infinity. When saying this are then they talking about the one-point compactification? Here is the part form my book:

The problem I have is that the function may only be defined on S, what do they know what happens at infinity?, the point we add? Does every continuous function have a continuous extension to the compact topology given by the one point compactification. And from what I read, since they talk about vanishing at infinity, is this extension unique?
 A: If $X$ is a locally compact Hausdorff space, one says that a function $f\colon X \to \mathbb{R}$ "vanishes at infinity" if for every $\varepsilon > 0$ there is a compact $K_{\varepsilon} \subset X$ such that $\lvert f(x)\rvert < \varepsilon$ for all $x\in X\setminus K_{\varepsilon}$.
If $X^{\ast} = X \cup \{\infty\}$ is the one-point compactification of $X$ (which is in fact not a compactification if $X$ is already compact, since then $X$ is closed in $X^{\ast}$ and thus not dense), then $f$ vanishes at infinity if and only if the function
$$\hat{f} \colon x \mapsto \begin{cases} f(x) &, x \in X \\ 0 &, x = \infty\end{cases}$$
is continuous at $\infty$.
So while the concept can be defined and understood without mentioning the one-point compactification, it is more transparent when viewed in the context of the one-point compactification.

Does every continuous function have a continuous extension to the compact topology given by the one point compactification?

No, we have a continuous extension to $X^{\ast}$ only if the function vanishes at infinity or differs by a constant from a function vanishing at infinity. Viewing $X$ as a subspace of $X^{\ast}$, if $X$ is not itself compact that is the case if and only if $\lim\limits_{x\to\infty} f(x)$ exists. If $X$ is already compact, $\infty$ is an isolated point in $X^{\ast}$, so every continuous function on $X$ can be arbitrarily extended to $X^{\ast}$ to yield a continuous function.
That answers the last question, the continuous extension, if it exists, is unique if and only if $X$ is not compact.

A side note: A subspace $X$ of a locally compact Hausdorff space $Y$ that is itself locally compact in the subspace topology is the intersection of a closed subset and an open subset of $Y$, hence it is a Borel set. So the premise that $S$ be a Borel subset of $\mathbb{R}^d$ is redundant, it is implied by the premise that $S$ be locally compact.
