A celebrated theorem of Nagata and subsequent refinements to schemes and algebraic spaces say that over a not-completely-monstrous base scheme, any separated morphism can be openly immersed in a proper morphism.
The construction of such a compactification is involved and I have no big picture. For nice topological spaces, there are several constructions of compactifications: some small (Alexandroff), some large (Stone-Čech), and surely others I don't know of.
What sort of compactification is Nagata's compactification theorem about? Does it have a nice analogue for topological spaces? Topological manifolds? Smooth manifolds?