Compactification of Manifolds
Solution 1:
Just to take this question from the "unanswered" list. (It was actually answered in comments.)
(1). The simplest example of a manifold which is not homeomorphic to an open subset of a compact manifold is an infinite disjoint union of circles. [Edit: I stand corrected: the simplest example is ${\mathbb N}$ with discrete topology. I was only thinking about manifolds of positive dimension.]
(2). If you want a connected example, then it first appears in dimension 2: If a connected surface $S$ has infinite genus then it is not homeomorphic to an open subset of a compact surface. This is intuitively clear, but I will nevertheless give a proof which works in all dimensions.
Since $S$ has infinite genus, the image of the natural map
$$
\phi: H^1_c(S; {\mathbb R})\to H^1(S; {\mathbb R})
$$
has infinite rank (each "handle" in $S$ contributes a 2-dimensional subspace). Suppose that $S\to T$ is an open embedding of $S$ to a compact surface $T$. Then we have the commutative diagram
$$
\begin{array}{ccc}
H^1_c(S; {\mathbb R}) & \stackrel{\phi}{\to} & H^1(S; {\mathbb R})\\
\psi\downarrow & ~ & \eta\uparrow \\
H^1_c(T; {\mathbb R}) & \stackrel{\cong}{\to} & H^1(T; {\mathbb R})
\end{array}
$$
(Note that the induced maps of ordinary and of compactly supported cohomology groups go in opposite directions, this is what used in the proof.) Since $H^1(T, {\mathbb R})$ is finite-dimensional, the image of $\eta\circ \psi$ is also finite-dimensional, which is a contradiction.
Edit. There are less trivial examples in dimension 3. Haken proved that a certain open contractible 3-manifold does not embed in any compact 3-manifold:
W. Haken, Some results on surfaces in 3-manifolds, Studies in Modern Topology, Math. Assoc. Amer. (distributed by Prentice-Hall, Englewood Cliffs, N. J.), 1968, 39-98.
This result was generalized in
R. Messer, A. Wright, Embedding open 3-manifolds in compact 3-manifolds. Pacific J. Math. 82 (1979), no. 1, 163–177.
who found necessary and sufficient conditions for embedding in compact 3-manifolds of open 3-manifolds of the form $$ \bigcup_{n \in {\mathbb N}} M_n, $$ where for all $n$, $M_n$ is a compact submanifold with toral boundary and $M_n\subset int(M_{n+1})$.