We study the formation of the hydrophobic core for a villin headpiece 36-residue protein (HP-36) by using the successive time frames for the all-atom coordinates (as functions of the time-stepindex j) obtained from action-derived molecular dynamics simulations. In an aqueous environment,the side chains of its hydrophobic residues gather to form a hydrophobic core, driving HP-36 tofold into the stable native structure. The hydrophobic core of HP-36 consists of the side chains offive hydrophobic residues, Phe7, Phe11, Phe18, Leu21, and Leu29, in its folded native structure. We directly measure the distances between the side chains of the five hydrophobic residues in thehydrophobic core of HP-36 from the straightly-extended structure (j = 0) to the folded nativestructure (j = 2000) in order to find when the hydrophobic core is formed and becomes stable. Ina very early folding stage, these distances reduce quickly, leading to a rapid compaction. This veryearly compaction is not stable because the distances between the side chains of three phenylalaninesexpand prominently later. At the end of early folding stage (j < 1000), all distances betweenthe side chains of the five hydrophobic residues become close, and the collapsed HP-36 obtainsminimal stability. In the later folding stage (j > 1000), these distances show some expansionaround j 1200, and they gradually approach their final values after that expansion.