The typical scenario where T.38 is used is - T.38 Fax relay - where a T.30 fax device sends a fax over PSTN to a T.38 Fax gateway which converts or encapsulates the T.30 protocol into T.38 data stream.
The T.38 recommendation defines the use of both TCP and UDP to transport T.38 packets.