Everything about growth in our bodies is controlled to some degree by our genes. Together with our envirnonment, genes make us who we are. So, if you have a family that is able to grow hair long then this is probably because there are some particular family genes controlling this.
Some people can grow their hair to their waist and then it stops growing; others are able to grow it for several metres and then it stops. You can usually grow hair by a centimetre or so each month so if you want to go from short to long hair then it would take a year or two to do this. Healthy hair needs a diet with lots of fruit, vegetables and protein in it.
We have cells on our scalp that make inundations called hair follicles. These follicles secrete proteins which assemble into hair, and when this happens, it pushes the hair that is already there out the top of our scalp.