OK the difference is that the enclosure without the hole will have significantly less deep bass output. That hole has vibrating air in it that is generating low frequencies. That is called Helmholts resonance. It operates on the same principle that a particular note is generated when you blow over the open top of a beer bottle or a jug. In a sub with the hole in it, called a ported sub, Helmholts resonance is very carefully controlled to give you a big assist in deep bass. The only penalties are that a larger cabinet is needed and there can't really be any more output below the resonant frequency of the port (but that is OK since these ports are producing sound at the lower end of human hearing ability).
To sum it up, larger sub with hole in it ("ported subwoofer") will have much more deep bass capability but is larger. Smaller closed cabinet sub (called a "sealed subwoofer") will be smaller but won't be nearly as capable in deep bass frequencies.