Everyone has a limited number of hair follicles when they are born. These follicles get thicker until you reach adolescence. When you reach 20~22 years old, you will have a normal hairline.
After this stage, the hairline will only go further back due to genetic reasons. The follicles will make thinner hair and the hairline will eventually go back. This is known as male pattern baldness.