Good question! Muscle twitching and muscle shaking can have similar causes, so let me describe shaking first.
1) Shaking muscles is not uncommon in yoga and other fitness programs. There can be lots of reasons for it, and a few, rare reasons could be serious enough that a visit to a doctor to rule them out is a wise idea. (Disorders and diseases like ALS and MS can also cause shaking.) But in general the shaking probably comes from either muscle fatigue (most common) or a lack of nutrients (dehydration, low blood sugar or electrolytes) which also cause the muscles to fatigue quickly.
This article in Scientific American, while 20 years old now, is still current scientifically.: Why do muscles tremble after strenuous exercise?
. In it you will read how no single muscle cell fires or engages independently, but rather they all act in concert with other cells in “motor units,. A motor unit is a grouping of muscle cells (they can be as few as 3 cells such as in your vocal chords to thousands, such as in your calf muscles) innervated by one nerve. When that nerve turns on, every cell in the motor unit activates and that part of the muscles tries to contract. When the motor unit gets tired, other motor units (thus other cells) activate. So, our muscle cells take turns activating. This turning on and off is well coordinated and we never notice that some muscle cells are resting while others are working. However, when we have overdone it and these cells get fatigued, they all turn off leaving very few motor units to do the requested work. That screws up the coordination between motor units and they turn on and off irregularly, causing the shaking many students notice.
With greater strength and endurance building over time, the shaking should decrease. If this doesn't occur, then the cause of the shaking may be due to something other than muscle fatigue. It may be due to nerve impingement/entrapment sending faulty signals to the muscles, chronic dehydration or malnutrition or, again, more serious problems that should be checked out.
2) Now, your student was not complaining about shaking after physical exertion but a twitching even while relaxed. There is a fancy word for twitching muscles: fasciculations
. But, lets stay with “twitching". It can have a related cause to shaking, but in this case, it may just be one motor unit going rogue and turning on and off regardless of what all the other motor units are doing. This results in a localized twitch, which we all get from time to time. This is mostly due to the nerve controlling that motor unit going a bit weird (that's not the technical term for it.)
Again there could be some causes of local twitching that indicate a serious underlying problem, like autoimmune problems, or it could be due to drugs, caffeine, lack of sleep, lack of nutrition/hydration/electrolytes, muscle fatigue, anxiety or other forms of stress. If it is accompanied by weakness in the muscles or doesn't stop, then definitely your student should see a medical professional about it.
Sometimes, it can be caused by a nerve getting pinched or trapped temporarily, which can also cause cramping, by the way. So, to test this out, your can suggest your student try the pose with subtle or large differences in the posture: move the legs wider apart or closer together; bend the knee or straighten the leg more; use a blanket under the pelvis. Experiment and see if some modification of position helps.