So for me, my old bike is more or less permanently mated to the trainer, which is a Wahoo KICKR Snap.
Trainers used to be devices to impart resistance - a heavy flywheel cranked down to your rear tire, essentially - with no intelligence attached. Crank it down harder for more resistance.
In the last several years, that's changed, so the dominant type now is a "smart trainer" that has the ability to dynamically adjust the resistance when driven by an external computer, and measure actual power output.
This is good because cycling training is (to drastically oversimplify) generally predicated on various types of intervals all expressed as a percentage of your maximum 1-hour power output ("functional threshold power," or FTP). Say, a warmup at 50%, then alternating intervals of 2 min at 180% and 3 min of 75%, or somesuch.
With a smart trainer, I can just keep my cadence constant (usually about 90-95 rpm) and the trainer will get easier or harder as indicated by the training plan's instructions from whatever device I'm using to drive the trainer (I use an iPad; some folks laptops). I don't have to do anything to the bike or the trainer to adjust the resistance; it's handled for me. This sounds small, but it's really pretty great.
This intelligence also allows for "virtual cycling" routes in apps like Zwift (Win/Mac/iOS/Android), which model real-world locations for you to ride through. The trainer gets harder as you go uphill, and easier as you go downhill, and it factors in your weight and power output to model speed. It's pretty neat (and immersive enough that, even with an iPad screen, I have found myself wanting to lean into turns). There are even races in Zwift (I raced last night, in fact).
Since cycling as a hobby/culture is really tied to the idea of the group ride -- an activity that has been pretty seriously quashed by COVID -- you can imagine that smart trainers and Zwift subscriptions are selling like HOTCAKES right now.
There ARE now full-scale dedicated trainer bikes designed to do all this (Wahoo makes one), but it seems to me to be kind of a rich-man's-folly approach. (Wahoo's model is $3499.) You can do so much with your old bike (free, because you already have it) and a trainer (Wahoo's line starts at $500) that I'm not sure I see the point.
Tools like Peloton really address a different market, i.e. people who really love spin class. That's a good workout, but it's not a cycling workout; Peloton bikes in particular also lack the ability to dynamically adjust resistance, so you can't get the same kind of immersion over a virtual course or hands-off interval workouts. They're neat and lots of people love them, but it's a different market. OTOH, if you just seek a nice indoor fitness device, they might be a good all-in-one option.