How does a student unlicenced pilot hold an appropriate licence granted to fly say a Seneca twin?
Because there is a type rated pilot with an instructor rating sitting in the right hand seat !
See 53: Exception for dual flying training
(or 52 Exception for solo flying training)