Like others have said, your spin workout depends on you, how hard you set the resistance and your cadence.
It is very difficult to get as much of an aerobic workout on a real bike versus a spin class as the real world has stoplights etc where you aren't working every second of the hour, like you do in spin class.
Real bike is certainly more fun but spin class is great workout IMO.