The pilot uses the second engine to fly to the nearest airport and land. All two engine aircraft are designed to fly with only one engine. That is one of the benefits of a two engine aircraft. It is why the U.S. Navy prefers two engine aircraft. It is an insurance policy to bring a malfunctioning aircraft back.
This is an A-10 returning from a mission during the Gulf War. It was struck by a MANPAD. The second engine brought it back to its home base safely. A single engine aircraft would have crashed and the pilot captured or killed.
Source : Quora