An outgroup is a group which shares a common ancestor with the dataset and this defines the root of the tree. In other words, the outgroup gives the orientation of evolution.
Choosing an outgroup is not absolutely required, the parsimony search does not care about the rooting of the tree. But to interpret the cladogram, and to compare several trees, it is very much useful to have a reasonable outgroup.
This task is not easy in general. In theory, the outgroup should not belong to the sample under study (the ingroup). But this requires to have already a good knowledge of the global phylogeny. This outgroup should not be too far away in evolution (because the relationship with the ingroup might be lost), and not too close (because it could probably be considered as part of the ingroup).
One way of determining the outgroup is to use the transformation of some characters for which we know how they evolve. Ideally, we should use many such characters. But in practice, in astrophysics, it is difficult and we can be lucky if one such parameter is available. For instance, the mass of galaxies is probably a good indicator of the arrow of evolution. Unfortunately, it is not easy to measure. Another good indicator I often use is the global metallicity which globally increases alongside the evolution of the Universe.