There are two main types of Smart Trainer workouts.
ERG MODE
ERG mode keeps you accountable to your interval workouts, making sure you hit your power targets by increasing resistance if you slow down, and easing up if you pedal faster. ERG mode apps (TrainerRoad, Sufferfest) often come with libraries of interval workouts and training plans, adjusted for your current fitness level, and show your training data onscreen. Gearing doesn't change the difficulty of your workout here, so leave your bike in your fastest gear for the best road feel.
SIM MODE
SIM mode simulates an outdoor ride: tougher on the climbs than the downhills. SIM mode apps (such as Zwift) often come with realistic graphics, and allow you to race with other app users and participate in challenges. Use your gears like you would outdoors.