Tonsils are the part of the immune system of the body. They constitute the first line of defence of the body. Tonsils are located at the top of the pharynx, on each side of the back of the throat. There are three pairs of tonsils: the pharyngeal, the palatine tonsils, and the lingual tonsils. The main function of the tonsils is to protect against harmful substances that may enter the body through the nose and the mouth.