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.
Let us write $F:X\to \Omega(C_0(X))$ for the map $F(x)=\hat{x}$. Let $U\subseteq X$ be open and $x\in U$. Let $V$ be open such that $x\in V\subseteq \overline{V}\subseteq U$ and $\overline{V}$ is compact. By Urysohn's lemma, there exists a continuous function $f:X\to [0,1]$ such that $f(x)=1$ and $f(y)=0$ for all $y\in X\setminus V$. Since $\overline{V}$ is compact, $f\in C_0(X)$. We now see that $\{\hat{y}\in\Omega(C_0(X)):\hat{y}(f)\neq 0\}$ is an open subset of $\Omega(C_0(X))$ which contains $\hat{x}$ and is contained in $F(U)$. Since $x\in U$ was arbitrary, this means $F(U)$ is open, and so $F$ is an open map.
Best Answer
Let $e \in C_0(X)$ be the unit. For each $x \in X%$ there is a $f \in C_0(X)$ with $f(x) \ne 0$. As $e(x)f(x) = f(x)$ we must have $e(x) = 1$. So $e$ is the constant function $e=1$. But $1$ "vanishes at infinity" only if $X$ as compact: By definition there is a compact $K$ such that $1 = |1(x)| \le \frac 12$ outside $K$, i. e. on $X \setminus K$, so we must have $X \setminus K = \emptyset$ and $X= K$ is compact.
Addendum: Let $f \colon X \to \mathbb C$ be continuous. We have $f \in C_0(X)$ iff "$f$ vanishes at infinity", that is $$\tag{+} \forall \epsilon > 0\>\> \exists \text{compact }K \subseteq X\>\>\def\abs#1{\left|#1\right|}\forall x\in X\setminus K : \abs{f(x)}\le \epsilon $$ Another way to describe $f \in C_0(X)$ is to say that "$f$ is small outside compact sets". Now lets consider a constant function $f = \lambda$. As $f$ is continuous, we have $f\in C_0(X)$ iff $(+)$ holds. $(+)$ states for our constant $f$ that $$\tag{$+_\lambda$} \forall \epsilon > 0\>\> \exists \text{compact }K \subseteq X\>\>\def\abs#1{\left|#1\right|}\forall x\in X\setminus K : \abs{\lambda}\le \epsilon $$ If $X$ is compact, we may choose $K := X$ and $(+_\lambda)$ is true (as in this case the condition $\forall x \in \emptyset$ is empty).
If $X$ is not compact and $\lambda \ne 0$, let's apply this for $\epsilon = \frac{\abs{\lambda}}2$, we get some $K \subsetneq X$ such that $$ \exists x \in X \setminus K \>\> \abs\lambda \le \frac{\lambda}2 $$ which is nonsense. So non-zero constant functions aren't members of $C_0(X)$ in the non-compact case.