Lando lived on Bespin in a cloud city where he was a big shot because of gas mining. He sold Han Solo and Leia out to the Empire to save his own business. This didn't turn out so well for him and he ended up feeling Bespin with Leia after Han got captured by the Empire and carbon frozen. That was all in The Empire Strikes Back. In Return of the Jedi he helps Leia get Han back by being a spy in Jaaba's palace. He then joins the Rebellion and pilots the Millenium Falcon (which he owned before he lost it to Han Solo in a Saabac game) and shoots one of the proton torpedos that destroys the second Death Star.