So, as I said, it appears that it's awfully hard to hide a commercial airliner from military radar.
But let's backtrack a bit. Why do aircraft carry transponders? (What is a transponder?) There are a couple of reasons here. First, we need to look at a big problem with radar. It has limited range. We can see this quite simply by considering what happens to the energy contained in a radar pulse sent out by an antenna. The pulse spreads out as it travels, and so the intensity of the pulse diminishes. It follows an inverse square law, which is very common in physics. If you are in a plane and you double your distance away from the antenna, the electric field strength you receive is quartered. This pulse is then reflected back toward the antenna. Again, the reflection spreads out, and it follows an inverse square law. By the time it gets back to the antenna, it has undergone two inverse square spreadings. That makes an inverse fourth power law. In other words, if you double your distance from the antenna, the radar station will receive only 1 over 2 to the power of 4, or 1/16th of the power. That rather limits the range of radar.
Yes, there are other things to consider, such as absorption in the atmosphere, and radar ducts (paths of high transmission) due to interesting meteorological conditions, but, basically, if you rely on reflections of the radio waves to detect an object your ability to detect goes down rapidly as the object gets further away.
That's where the transponder comes in. When the transponder on the plane detects a radio pulse coming in, it calls back. The power it transmits back with is much greater than the strength of the reflected pulse. Thus there'll be sufficient power to get back to the ground station, and the plane is detected. There's only one inverse square law that matters, and that helps considerably with range.
Secondly, the transponder rather helpfully transmits an identifier that tells the ground station what it is. Rather than simply a blip on a radar screen, it's a labelled blip.
Until the transponder is turned off, of course.