Let’s take a picture as example:
this image has to be processed through a special graphic software to get a color separation in CMYK . Basically, the RIP software will extract from this image the basic colors Cyan (C), Magenta (M), Yellow (Y), Black (K), so that the result you will get from this overlapping when printing the 4 different colors CMYK in screen printing or T-Shirt will be as closest to the original as possible.
This CMYK colors separation process has been optimized for many years for the Offset printing.
There are many SOFTWARE like for instance Adobe Photoshop that do the color separation by putting the colors CMYK in 4 different channels.
Yet, in screen printing and t-shirt printing there is often a request for a larger number spot colors separation beside the CMYK (typical for Offset) in order to get better results from a color and visual point of view.
Here below a several spot colors image
The textile T-shirts printing technology can rely on the carousel printing machines that are 6-8 up to 12 colors in sequence and would be therefore able to print a separated graphic up to 10-12 colors on fabric.
This more than 4 color CMYK separation is called Polychromy and is often employed for the t-shirt printing