They’re a great workout, but not the equivalent of long distance cycling. They are more like interval training over a short road course – I’d say a 60-minute spin class is around the equivalent of a 16 to 18 mile road ride, depending on how hard you crank down the resistance.
It’s not really like road cycling, either. The instructors I’ve had tend to put you in awkward, inefficient riding positions in order to work muscle groups. For example, when you get out of the saddle on a road bike, you want to move your shoulders forward to keep your back flat. Spin instructors like you to move your butt back and get low, isolating the glutes, but killing your lower back. You could not ride that way on the road for very long.
Training for distance is a different animal altogether. Interval training is about strength and speed, not endurance. While it helps – you need those abilities to conquer hills and headwinds – you have to work up to longer distances by following a program of increasingly longer rides. It must include rest days, and cover things like eating on the road and improving the efficiency of your position and technique.
Bottom line: spin is a good thing to do in the winter, but it doesn’t really train you to be a cylist. You need a bike with two wheels to do that.