They encode in a variety of codecs and bitrates, and feed a matching one depending on the target device used for playback.
For audio that includes AAC or Opus, all the way down from 24 kbps and up to 192 kbps (for 720p resolution videos and above, on high speed Internet).