A tree data structure models hierarchical relationships by starting with a single root node. Each node can have zero or more child nodes, forming levels of hierarchy. The root has no parent, and every other node has exactly one parent, ensuring a clear path from root to any node. Trees do not allow cycles, meaning no node can be its own ancestor, which keeps the hierarchy clear and unambiguous. This structure is useful for representing real-world hierarchies like family trees, organizational charts, or file directories. The execution steps show adding nodes from root down to grandchildren, checking for cycles, and confirming the hierarchy is complete.