i assume that the head unit is connected to the amp, and all your speakers are running through the amp. this assumption brings me to the conclusion that your amp is faulty.
try connecting the speakers (or atleast 1 speaker) directly to the headunit and see if the music through that speaker turns off. if it doesnt turn off, and music is still being played via the speaker you connected to the head unit, then u know its the amp which is faulty..
possible causes of the amp stopping is it may be overheating (if you are playing music too loud and there is not enough air ventilation.
more information is needed. what have you tried to do to fix it? have you tested anything?