Along with the adenoids, the tonsils are composed of lymphatic tissue, and form part of the immune system, helping to prevent infectious organisms entering the body via the mouth (i.e. in food or air). Tonsillitis develops if they become infected themselves.
Most cases of tonsillitis are caused by viral infection. Along with others, the viruses responsible may include Epstein-Barr virus (which also causes glandular fever), viruses from the Herpes simplex family, cytomegalovirus, and the measles virus.
Bacterial infections are less frequent, but when they do occur tend to be caused by one of the Streptococcus bacteria.
Children are at particular risk of tonsillitis, and are more susceptible if there is a family history of tonsillitis or atopic disease (i.e. hay fever, dermatitis or asthma). Other predisposing factors include living in over-crowded conditions, and being malnourished.