Rather than a printing method, this actually uses thread stitched into the fabric. In old times, someone’s grandmother probably stitched all their baseball caps’ logos, but now it’s all done by machine. For a few dollars, an embroidery can be done with a few thousand stitches in less time than you could even ask a grandmother to do it.
This is a great application for hats and smaller logos on shirts. It gives a high-quality, personal look (probably because it makes people think of grandma!)