most aftermarket stereos have an automatic "breaker" so that if the you happen to touch the wires together or if the speaker shorts it either momentarily shuts off that channel or shuts off the radio. in my experience this can happen if there is an issue with the speaker, if the speaker is trying to consume to much wattage or if there is a wiring issue.
assuming that the power and ground wires that feed the radio are good, I would start by disconnecting one speaker at a time, and testing after each speaker is disconnected. include all speakers and hook them back up after testing. if it seems to be ok after unhooking a certain speaker then replace that speaker, if it still cuts out after disconnecting all of the speakers, then disconnect the wires directly at the radio making sure nothing touches one at a time. if it seems to be okay after disconnecting a certain pair of wires then you need to replace the wire from the radio to the speaker. if it still cuts out after disconnecting the wiring at the radio, I would either have the radio replaced or possibly tested.