This video describes how hierarchical sequencing works, specifically:
Top to bottom: working down the hierarchy of segment types
Front to back: going through twin chains
Left to right: moving to a different segment type at the same level of the hierarchy and a child of the same parent
Up and to the right: moving to a different segment type higher up in the hierarchy
This video also describes where and how segments are stored in IMS databases.