You can get hypothyroidism if you've had surgery to remove part or all of your thyroid gland. You may have that done if you have a growth on your thyroid, or if it's making too much hormone (which is called hyperthyroidism).
If you have the entire gland removed, you will get hypothyroidism. For some people, if only part of it is taken out, the part that's left behind may still be able to make enough thyroid hormone.