On rebel or xx0D series cameras by Canon, the way the camera can tell if a flash is on is due to a sensor on the hot shoe itself. Underneath one of the side rails is a little bar. When a flash is off, this bar goes from the bottom to the underside of the rail. When a flash slides in, this bar is pushed down then informs the camera there is something attached.
When you remove a flash, this bar goes back up and tells the camera there is nothing there.
However, since this is just a thin piece of metal, and if you use your external flash often, it may not come back up as high as needed. When this happened to me, I just took some pliers and gently pulled one end up more and the built in flash started to work again.
Let me know if any of this needs more clarification.
Canon 5DIII, Rebel XTi/400D
Canon EF 16-35mm f/2.8L II, 24-105mm f/4L, 50mm f/1.4, 70-300mm f/4-5.6 DO, 85mm f/1.8
Sigma 150mm F2.8 EX Macro
Sigma 10-20mm f/4-5.6 EX, Canon EF-S 18-55mm f/3.5-5.6 II
Canon 430EX II
Opteka 13mm, 21mm, and 31mm extension tubes
Vivitar 50mm f/1.8 for OM System