Let $X$ and $Y$ be two topological spaces, and let $X^*$ and $Y^*$ denote their one-point compactification ($X^* := X \cup \{\infty\},\,\mathcal{T}^* := \{U \subseteq X^*\mid U \cap X \in \mathcal{T} \land (\infty \in U \implies U= (X \setminus K)\cup \{\infty\}$, $ K $ closed and compact$\}$).
Let $f:X\rightarrow Y$ be a continuous function. How can $f$ induce a continuous function between $X^*$ and $Y^*$?
My idea was to define $f^*(x)=f(x)$ for $x\neq \infty$ and $f^*(\infty)=\infty$. Then, let $U\subset Y^*$ be an open subset.
If $\infty\notin U$ then $f^*{}^{-1}(U)=f^{-1}(U)$ is open since $f$ is continuous.
If $\infty \in U$, then $U=(Y\setminus K)\cup \{\infty\}$ and $f^*{}^{-1}((Y\setminus K)\cup \{\infty\})=f^*{}^{-1}(Y\setminus K)\cup f^*{}^{-1}(\{\infty\})=f^{-1}(Y\setminus K)\cup\{\infty\}$.
But $f^{-1}(Y\setminus K)=X\setminus f^{-1}(K)$ and since $K$ is closed and $f$ is continuous, $f^{-1}(K)$ is also closed. Since we know that $X$ topological space implies $X^*$ compact, and closed subsets of a compact are compact, we conclude $f^{-1}(K)$ is compact and therefore $f^{-1}((Y\setminus K)\cup\{\infty\})$ is open.
So apparently there seem to be no extra conditions required, however this question (Continuity of the extension of a function between two locally compact Hausdorff spaces to their one point compactifications) suggests otherwise: It requires $X$ and $Y$ locally compact Hausdorff and $f$ proper. Could you suggest where the mistake is?
Thank you very much for your attention.
Robert gave you an example. I'll try to explane some "logic".
You said that $f^{-1}(K)$ is closed since $K \subset Y$ is closed and $f$ is continuous. That is true but in the sense of space $X$. In the sense of space $X^*$ it will be closed if and only if $f^{-1}(K)$ is compact in $X$ (a closed but not compact subset of $X$ is not closed in $X^*$). A function that satisfies $f^{-1}(K)$ is compact if $K$ is compact is called a proper function. It is often referred as "continuity at infinity" (I saw such "definition" in one book about differential topology, I don't remember in which one exactly).
In Robert's example you have a function $f$ such that $f^{-1}(K) = X$ where $K = \{z: |z| \le \frac{1}{2}\}$. $K$ is compact in $Y$ but $f^{-1}(K)$ isn't compact in $X$. Therefore $f$ is not proper and $f^*$ is not continuous.