In Vol. I: Men & Magic, the description of player-character elves is pretty short:
Elves: Elves can begin as either Fighting-Men or Magic-Users and freely switch class whenever they choose, from adventure to adventure, but not during the course of a single game. Thus, they gain the benefits of both classes and may use both weaponry and spells. They may use magic armor and still act as Magic-Users. However, they may not progress beyond 4th level Fighting-Man (Hero) nor 8th level Magic-User (Warlock). Elves are more able to note secret and hidden doors. They also gain the advantages noted in the CHAINMAIL rules when fighting certain fantastic creatures. Finally, Elves are able to speak the languages of Orcs, Hobgoblins, and Gnolls in addition to their own (Elvish) and the other usual tongues.That’s actually not that complicated. They start out as one of two classes, can switch to the other class between adventures (in other words, in town,) and can use equipment and abilities of either of their classes, in exchange for level limits. People make this a bit more complicated than it needs to be.
“But what about hit points?” is the objection people raise. “How do you know which hit dice to roll for hit points?”
Think about non-elves who switch classes for a moment. A 3rd level human fighter with a 16 Intelligence decides to become a magic-user. How would you figure out that character’s hit points, without overthinking the process? At 3rd level, a fighter has 3 hit dice, so their hit points range from 3 to 18 (average 10.5) using the old M&M hit dice progression. Then the fighter becomes a 1st level magic-user, which only has 1 hit die. They wouldn’t lose their existing hit points, but they wouldn’t gain any, either. Three hit dice is more that 1 hit die, so just keep what hit points they have until they hit 6th level, when a magic-user gets 3+1 hit dice, which is more than the 3 hit dice of a fighter. Not complicated.
An elf would work the same way. The only difference is that an elf can switch back and forth, but each time, they keep their current hit points, and only add hit points when they earn more hit dice than what they started with.
The other option, one I think Gygax mentioned in an early Strategic Review or Dragon article, is to roll for both classes and average them together. That’s a little too complicated, but if you are using the Greyhawk supplement, it becomes easy: fighters get d8 for hit dice, magic-users get d4 for hit dice, and the average of a d8 and d4 is a d6. Just give them as many d6s as their highest class level. This is what the race-as-class elves in later editions of the Basic D&D line does. For OD&D, with its separate tracking of levels for each class, this helps compensate for the elf’s advantages; elves take much longer to increase their hit points than would a human of any class.