Puffball mushrooms develop their spores inside their hollow fruiting bodies. Once mature a hole opens in the top to release spores when compressed, usually by animal activity, human intervention, or rain.
If you want to see a video of the spore release, which I highly recommend, you can find a video here!
See the rest of my posts for Funguary here!
Puffball mushrooms on campus, they're soft now and should be making spores soon, wish I had found them when they were firm, always wanted to eat one.