I have a boil on the back of my head, the swelling has gone down but then I found two sollen glands at the back of my neck under the boil.

See below. If you have a boil it is very common for the lymph nodes in the local area to get inflammed. They will go away as the boil subsides.
You should. Your lymphatic system is designed to carry the fluids related to inflammation away from the site, be processed by your immune system and eliminated from your body. The boil is in fact a dermal (skin) abscess (infection) and drainage from the scalp will be carried to cervical and occipital lymph glands (nodes). Your description is entirely consistent with the body defenses.