Each hair on your body grows from its own individual hair follicle. Inside the follicle, new hair cells form at the root of the hair shaft. As the cells form, they push older cells out of the follicle. As they are pushed out, the cells die and become the hair we see.
In the growth phase, a follicle will produce new cells for a certain period of time depending on where it is on your body. Then it will stop for a period of time then restart (rest/growth ad infinitum).
When the hair follicle enters the rest phase, the hair shaft breaks, so the existing hair falls out and a new hair takes its place. Therefore, the length of time that the hair is able to spend growing during the growth phase controls the maximum length of the hair.
The cells that make the hairs on your arms are programmed to stop growing every couple of months, so the hair on your arms stays short. The hair follicles on your head, on the other hand, are programmed to let hair grow for years at a time, so the hair can grow very long.
Animals that shed (or moult) have hair follicles that synchronize their rest phase so that all of the follicles enter the rest phase at once. This way, all of the hair falls out at one time. A dog that sheds its coat will lose its hair in large clumps.