When a balloon was inflated by filling air into it, it bulges out. The air inside the balloon occupies space, has mass and volume. It is also compressible. The air pressure outside the balloon is less than the air pressure inside the balloon. So air pressure inside balloon keeps it bulging or inflated.
When the thread tied to the neck of balloon is removed, the air inside goes out because gases move from a higher pressure region to a lower pressure region. When gases escapes out, density of air inside the balloon reduces and it becomes like vacuum - no air. It collapses because the pressure of air outside is higher (atmosphere). So it presses against the outer walls of the balloon.