The method
Six casts of three coins build one hexagram, from the bottom line up.
Take three coins. For each cast, count the heads. Heads are yang; tails are yin.
Three tails
Old yin. This gives the line 6, a yin line marked to change.
Two tails, one head
Young yang. This gives the line 7, a stable yang line.
One tail, two heads
Young yin. This gives the line 8, a stable yin line.
Three heads
Old yang. This gives the line 9, a yang line marked to change.
Repeat six times. Read the lines from the bottom up to form the hexagram.
Lines 6 and 9 may shift. They open a second hexagram, which you can compare.
You can also do this at home with three coins. The simulator follows the same steps.
The numbers 6, 7, 8, 9 are the classic code for the four line types.