When you inhale air through your nose, it contains lots of tiny particles, like dust, dirt, germs, and pollen. If these particles made it all the way to the lungs, the lungs could get damaged and it would be difficult to breathe. Snot works by trapping the particles and keeping them in the nose. After these particles get stuck inside the nose, the mucus surrounds them along with some of the tiny hairs inside the nose called cilia. The mucus dries around the particles.
Boogers can be squishy and slimy or tough and crumbly.
In fact, boogers are a sign that your nose is working properly.