A special transfer sheet, usually ISO A4 size, approximately USD 1 per sheet, is printed on with a regular inkjet printer. The photo has to be printed as a mirror image.
It is often a requirement of such "home made" garments that they be washed inside out, only in cold water, sometimes by hand, and not be tumbled dried. The heat from washing or drying conventionally, or from ironing over the transfer area, can damage the transfer or cause it to separate. This all generally makes them less practical for frequent wear than purchased items. To fix the image for a longer lasting transfer: wash with one cup of vinegar on cold setting on the first wash.
Avery markets a product called printable tattoo for other surfaces than textiles, including skin, plastics, ceramics and glass. The film is put upside-down on the skin, made wet for 10 seconds and then removed. The ink is left on the skin.