If you start with a Hausdorff space $X$ and want to consider a compactification, which by definition is a pair $(Y, f)$ where $Y$ is a compact space (let's be the most general and not require Hausdorff) and $f: X \to Y$ is an embedding and $f[X]$ is dense in $Y$.
Trivial example: if $X$ is already compact (and not even Hausdorff) then $(X, 1_X)$, where $1_X$ is the identity on $X$, is a compactification.
Also, for any space $X$, define $Y = X \cup \{p\}$, with $p \notin X$, with the topology defined by $\mathcal{T}_X \cup\{{Y}\}$ (the original topology on $X$ with just the whole set $Y$ added, which indeed is a topology on $Y$, as is easily checked), and let $f(x) = x$ be the obvious map from $X$ into $Y$. Then $f$ is an embedding, the only neighborhood of $p$ is $Y$ and this implies both that $f[X]$ is dense in $Y$ and that $Y$ is compact as well. In fact we can add more than just one point, we can add as many as we like... The resulting spaces are all compact for trivial reasons, and even if we start with a nice metrisable space, the compactifications are at most $T_1$ and never $T_2$. So allowing all spaces $Y$ allows for all sorts of trivialities.
This is the reason that most texts assume that $Y$ is Hausdorff as well, and so even $T_4$ by standard results. Note then that $X$, being homeomorphic to $f[X] \subset Y$ is at least required to be Tychonoff (a.k.a. $T_{3\frac{1}{2}}$) itself in that case, and because every Tychonoff space embeds into some product $[0,1]^I$, it always has a compactification (take $Y$ the closure of the embedded copy of $X$, essentially). So allowing only Hausdorff only compactifications, we get that we restrict to Tychonoff spaces, all of which actually have Tychonoff (even normal) compactifications, so we stay inside the same class of spaces, as opposed to the trivial example spaces above.
The one-point compactification case then becomes a bit clearer too: if we just take any space $X$ and call $(Y,f)$ a one-point compactification when $Y \setminus f[X]$ has one point, then a (even Hausdorff locally compact) space $X$ can have more then one non-homeomorphic one-point compactification: $\mathbb{R}$ has the circle, as usual, and its trivial extension from above, and more as well.
If $X$ is Hausdorff and we assume that all compactifications are Hausdorff, we get as a theorem that a one-point Hausdorff compactification $Y$ exists iff $X$ is locally compact and then it is essentially unique as well (as all such $Y$ must be homeomorphic).
If $X$ is just Hausdorff, we can define a space $Y = X \cup \{p\}$ (where $p \notin X$) with
the topology $$\mathcal{T}_X \cup \left\{ \{p\} \cup (X \setminus K): K \mbox{ compact and closed in } X \right\}$$ and this space is such that the $Y$ is indeed compact but it needs not be Hausdorff: in fact this space is Hausdorff only if $X$ was locally compact to begin with. If however $X$ is locally compact, it is the same unique Hausdorff compactification as before, so this space is the natural generalisation of the Hausdorff compactification. But as said, it's not unique outside of the Hausdorff setting, though it is IMHO the most natural one.
If $K$ is any compactification of $X$ (by which I mean a compact Hausdorff space with $j:X\to K$ a dense embedding), then the definition of the Stone-Cech-compactification provides you with a continuous map $J:\beta X\to K$ such that $J\circ i = j$, where $i:X\to\beta X$ is the embedding of $X$ into its Stone-Cech-compactification. This is the crucial aspect to know about the Stone-Cech-compactification: Any other map from X into a compact Hausdorff space factors through $\beta X$. Now $J$ is a continuous map between two compact Hausdorff spaces. To see that it is a quotient map you just need to prove the following:
- $J$ is surjective (this follows as $\beta X$ is compact, $j(X)$ is dense in $K$ and $J(\beta X)$ consequently is dense in $K$ as well)
- If $J^{-1}(U)$ is open for $U\subseteq K$, then $U$ is open. This is true for any surjective map between compact Hausdorff spaces and follows from the fact that images of compact sets are compact.
I don't quite understand your remark where you want to consider the one-point-compactification only. This is just a special case that generalises as sketched above (usually there are many different compactifications of a space, not just the two mentioned so far), but is not sufficient in itself.
Best Answer
If we take your definition ($Y$ compact Hausdorff and $y_0 \in Y$ such that $i: X \rightarrow Y \setminus \{y_0\}$ is a homeomorphism), the answer is clear:
$i[X] = Y \setminus \{y_0\} \subset Y$ is compact and hence closed in $Y$ (as $Y$ is Hausdorff), and so $\{y_0\}$ is open (i.e. $y_0$ is an isolated point of $Y$). So $Y$ then consists of a (closed) topological copy of $X$ (namely $Y \setminus \{y_0\}$) and an isolated point $y_0$. Indeed $i[X]$ is not dense in $Y$. So indeed this is incompatible with the usual definition of a compactification:
Commonly, a (Hausdorff) compactification of a space $X$ is a pair $(Y, i)$ where $Y$ is compact Hausdorff and $i : X \rightarrow Y$ is an embedding (or equivalently, $i$ is a homeomorphism between $X$ and $i[X] \subset Y$) and $i[X]$ is dense in $Y$. In this definition, a one-point compactification $X$ is a Hausdorff compactification $(Y,i)$ such that moreover $Y \setminus i[X]$ is a singleton.
Two compactications $(Y,i)$ and $(Y',i')$ of $X$ are called equivalent when there is a homeomorphism $h: Y \rightarrow Y'$ such that $h \circ i = i'$ as maps on $X$. One then shows that $X$ has a one-point compactification iff $X$ is locally compact Hausdorff and non-compact and moreover all of them are equivalent in the above sense.
In this general definition, if $X$ is compact and $(Y,i)$ is a Hausdorff compactification, $i[X]$ is compact and so closed, so it can only be dense in $Y$, $i[X] = Y$ and $Y$ is just a homeomorph of $X$. So there is no one-point Hausdorff compactification, in the general sense, when $X$ is already compact.
So maybe your text does not use the more common definition that includes denseness, or it implicitly assumes all considered spaces are non-compact, in which case we have no problem.