The latches that normally keep it shut are above the LCD on either side of the webcam. They are normally pulled down by magnets in the base (in fact, the case is magnetic near the button on the front). If the latches get magnetized in such a way that they are repelled by the magnets in the base, they will no longer engage. This happened to me when I was playing with a strong magnet near the latches. To fix it, you just need to remagnetize them with the opposite polarity. For me, all I had to do was bring the same magnet near them, but flipped around.
If that doesn't work, take it to Apple.