Direct to Garment (DTG) print technology uses what is effectively an inkjet printer for fabric. DTG printers can be small desktop items but the printers used in print-on-demand shops are large units that generally cost hundreds of thousands of dollars.
DTG technology is what made print-on-demand affordable. Before DTG, the dominant print technology for apparel was silkscreening, which has a high setup cost per print run (tens of dollars per color). Silkscreening is not economic for single-item print runs. DTG costs the same per-print for one item or a hundred, and you can have as many colors as you like in your artwork.
With both silkscreen and DTG, the blank product is placed on a platen that frames the printable area and holds the fabric rigidly in place. The platen is fed into the printer. This limits the printable area to roughly a rectangular space with enough extra garment around the edges to secure the platen. You can't print "all over" with DTG.
Advantages
Economical for single-item print runs
Supports full color artwork, including photography
Printed result still feels like fabric
Widely used in the print-on-demand industry
Disadvantages
Ink generally isn't as "thick" as silkscreen printing. Especially noticeable on fleece.
Fabric texture can show through the artwork
No economy of scale for long print runs; printing 100 identical items is the same as printing 100 different items
Can be finicky about materials; best with 100% cotton
Limited print areas (usually front, back, neck label, sleeves)
The machines are expensive!