The data structures are perhaps less interesting than you'd imagine.
The actual DOM hierarchy is composed of nodes with lists of child nodes and attributes. The lists are either double linked lists or arrays. Probably the latter, I'd imagine. The node also has properties for things like the parent node.
Separately from that, a hash table stores node to ID mappings (for `getElementById`). Another hash table stores lists of nodes for node to className mappings.