Casting a spell takes a magic-user's entire round. They may not take any other actions, including moving. The number of segments listed for a spell is only used to figure out when during a round the spell completes, which can be important for figuring out whether the spell is interrupted (and spoiled).
For a complete breakdown of the spellcasting process during combat, see page 65 of the DMG.
Learning AD&D for the first time from the original books takes a ridiculous amount of dedication due to the bizarre organisation, the rambling discoursive style, and the way a single rule can be spread across multiple chapters or even across the three core books. I certainly didn't learn the fundaments that way – like most AD&D players, I learned by playing with people who already knew how to play.
To learn directly from the books requires dedicating a lot of time, and using that time to read and re-read them, from cover to cover and in bits and pieces, while putting them to use in an ongoing campaign. A large tolerance for doing it "wrong" for a good while is helpful.
As an alternative, I can recommend reading OSRIC, which is a retro clone of AD&D. Its advantages include being more concise (it's only about 40 pages of rules plus 80 pages of spells), organised more like how we expect rules to be organised today, and free. It makes a good companion to the original books, and can help clarify rules confusion since it's much easier to find everything.
The conciseness of OSRIC is also its downside: it lacks the rambling commentary that puts the rules in context, and which sometimes provide more nuanced guidance that falls somewhere between "background" and "rules". For example, OSRIC makes no mention of spellcasting preventing crouching when a spell has somatic components. I never knew about that rule(?) until I re-read the several different sections in the PHB and DMG about spellcasting while I was looking for a citation for this answer.
Try to ignore segments. They're a concept that was mostly introduced to keep track of how long it takes to cast a spell (more on that below), and aren't helpful for the rest of combat.
Instead, concentrate in the actual initiative results. Treat the action of a round as mostly simultaneous, but with the winners of the initiative getting the advantage. So it's not really that the losing side stands still for 30s, it's that they both maneuver, but the side with the initiative simply maneuvered better and got the battle line they wanted.
So in general, just use initiative to decide what order to resolve actions in. You can layer on house rules on this to make it work more how you think it should, but it's not necessary. (One house rule you'll see sometimes is resolving all combatants' movement in initiative order first, and then resolving actions in initiative order, to make the feeling of everyone just standing around go away.)
As for spells, a spellcaster already in mid-spell from an earlier round doesn't act on the initiative number of their side. Segments are counted to find out when the spell finishes, and until it does they are occupied. This often won't matter, as many spells are fast enough to begin and finish before the enemy acts or the round ends, but when the initiative rolls are close, then it matters, and when the spell takes a lot of segments to cast, it matters more. The most important thing segments tell you is: does the magic-user get hit before the spell finishes, disrupting it? and, does the spell take up their next round as well? Segments exist almost entirely as a tool to determine the answer to those two questions.
Best Answer
The rules (such as they are) are on p.65 of the DMG
The reference to the PLAYERS HANDBOOK is not material but its discussion of Initiative begins on p.104 and goes through to the Example of Combat on p.105.
Note that AD&D rules inconsistently use the word MELEE - sometimes it means opponents in close-quarters engaged with melee weapons, other times it is used as a synonym for combat. The Example of Combat makes it clear that in the instance of SPELL CASTING DURING MELEE it means combat in general.
The important point above is No.2 which is bloody hard to parse. It is also flatly contradicted by what is said on p.66, which we'll get back to.
It says, if the spellcaster won initiative, the attack comes on the segment of the winner's initiative roll. This seems to imply that if the spellcaster lost initiative, attacks come on their losing roll. If this is correct, then attacks happen early in the round: the median is 3 and the mean is 3.08.
However, it's possible that this means it would always come on the winner's roll. If so, Mr Gygax could have just said that, however, while a man of many talents, clarity of writing was not one of them. If this is correct, then attacks come relatively late: the median is 5 and the mean is 4.47. This would make casting short spells a relatively safe bet but since this goes against the whole tone of the section, I don't think that's what it means.
How this works when one side is surprised is anyone's guess because "Surprise gives initiative to the non- or less-surprised party" meaning you don't roll dice for the first round.
The other rules are on p.66
So, that's clear, right?
Maybe I can put it better:
What we did
I cut my teeth on AD&D and we didn't use either of these incompatable rules. If you won initiative, you could safely cast your spell, if you tied it would be cast as you got hit and if you lost then the other side went first and you ran the risk of losing your spell.
Remeber, initiative is turn-by-turn in AD&D and actions must be declared before you roll. We didn't do that either.