The rover suffered damage to some files on its flash memory, possibly caused by cosmic rays. The computer is radiation hardened, but that does not mean that it is completely invulnerable to corruption. Right now, the rover is running on its back-up computer, which previously had only been used to test software updates before they were installed on the main computer. The rover was launched on its historic journey with only the software necessary for landing. Additional software needed for Curiosity's scientific endeavors was beamed to the rover later and installed remotely.
This glitch comes at a bad time for NASA engineers, as Curiosity had begun analyzing rock samples it ingested last month. Work is on hold now while the back-up computer is reconfigured to take over until the damaged system can be brought back online.