How do stealth planes stay invisible to radar?
The short answer is that they aren't invisible to radar. Any time you have a large metal object in the air, radar is going to pick up some kind of a return on its signal, what stealth technology has done is to reduce that return signature as much as possible so that the radar operator (or computer) does not recognize it as a plane, but as something smaller, like a flock of birds.
The technology was developed starting in the late 1970s, with prototype planes in testing by the mid-1980s. Three innovations in the first operational aircraft were key in their success as a stealth weapon. First, the design of the aircraft avoided sharp angles or boxy shapes that would tend to reflect more radar signal. In fact, the design tended to deflect a portion of the radar waves in a direction away from the radar source. Second, the plane is covered in an anechoic coating, which is a composite material that actually absorbs some of the radar signals. Lastly, the exhaust ports of the jet engines are shielded and diffused so that the heat signature of the plane is greatly reduced. This makes it hard for even heat seeking missiles to lock on to the plane in flight.
The first use of stealth planes in combat involved the F-117 Nighthawk fighter in the Persian Gulf War in 1991. The F-117s entered Iraqi airspace undetected, hit their targets and were already leaving the target area by the time the first anti-aircraft guns were fired. B-2 Stealth nuclear bombers, designed to replace the aging B-52 Squadrons, are famous for their giant bat wing appearance.