  Null shells are a useful geometric construction to study the propagation of
infinitesimally thin concentrations of massless particles or impulsive waves.
In this paper, we determine and study the necessary and sufficient conditions
for the matching of two spacetimes with respective null embedded hypersurfaces
as boundaries. Whenever the matching is possible, it is shown to depend on a
diffeomorphism between the set of null generators in each boundary and a scalar
function, called step function, that determines a shift of points along the
null generators. Generically there exists at most one possible matching but in
some circumstances this is not so. When the null boundaries are totally
geodesic, the point-to-point identification between them introduces a freedom
whose nature and consequences are analyzed in detail. The expression for the
energy-momentum tensor of a general null shell is also derived. Finally, we
find the most general shell (with non-zero energy, energy flux and pressure)
that can be generated by matching two Minkowski regions across a null
hyperplane. This allows us to show how the original Penrose's cut-and-paste
construction fits and connects with the standard matching formalism.
