While the first generation Xbox 360 was often plagued with the iconic Red Ring of Death whenever it overheats, the recently released version comes with a warning message as shown below, ensuring that Microsoft folks are a whole lot nicer than initially thought.
The Xbox 360 is shutting down to protect the console from insufficient ventilation. You can turn the console back on after the power light stops flashing.
At least this auto-shutdown feature ought to save you the hassle of sending back the unit to Microsoft for a replacement, right? Whatever the case is, make sure your place is well ventilated always if you want to ensure the longevity of your Xbox 360.