What are tonsils + why do we have them?

Why the heck do they swell up whenever I get a cold? How can I stop them from swelling? Why does gargling with salt-water (luke-warm) work occassionally?

Why the hell does the human race even have em? What purpose do they fulfill?

And why do they give those “pain” sensations?

The swelling is an immune response involving histamine which has to do with the capillaries in the area to become more permeable. This increased permeability makes it easier for phagocytes to access the infected area and for washing out dead cells and pathogens. You don’t really want to eliminate the swelling entirely, as it is beneficial.

Salt water creates a fluid gradient which will allow fluids in the infected area to leak back out. This reduces some of the swelling.

Tonsils are lymphoid organs, an important part of the lymphatic system that house phagocytic cells and lymphocytes. The tonsils trap bacteria and other matter in areas called crypts where they are destroyed.

Tonsils, like most other places in your body, have nerve receptors. Swelling will affect any local nerves as well has the tissues themselves.