Usually two parts, the turbo hardware, then some software/app that runs on a PC or pad/phone (e.g. TrainerRoad or Zwift.)
The hardware usually has a electronically controlled resistance, usually over FC-E wireless protocol. It’ll often also give a virtual power value based on wheel speed and resistance. These are then transmitted to the software running on a computer. The computer can show you this data (along with other data it might collect from other devices, e.g a heart rate monitor). It can also vary the resistance on the turbo so that power matches some chosen interval or maybe to simulate hills.
The software will usually generate files that can be loaded to TrainingPeaks or Strava.