What should I do during my PhD program to get a faculty position right after PhD, and how can I accomplish them? (Field: Statistics)
Obtain experience teaching a variety of courses.
Develop a wide network in the field. The better "known" that you are, the more likely a school is to consider you for a faculty position.
Establish relationships with multiple people who will be able to write you strong letters of recommendation.
Begin applying for grant money right now. 
Publish relevant and impactful research.
Consign yourself to the fact that your friends in industry will make more money than you.
Get lucky and find a tenure-track position.